aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/thread/Task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/thread/Task.cpp')
-rw-r--r--src/core/thread/Task.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/thread/Task.cpp b/src/core/thread/Task.cpp
index a5d718ee..3b27e52f 100644
--- a/src/core/thread/Task.cpp
+++ b/src/core/thread/Task.cpp
@@ -177,8 +177,9 @@ class Task::Impl {
SPDLOG_TRACE("task runnable {} finished, rtn: {}", GetFullID(), rtn);
// set return value
this->SetRTN(rtn);
-
+#ifdef RELEASE
try {
+#endif
if (callback_) {
SPDLOG_TRACE("task {} has a callback function", GetFullID());
if (callback_thread_ == QThread::currentThread()) {
@@ -236,6 +237,7 @@ class Task::Impl {
GetFullID());
emit parent_->SignalTaskEnd();
}
+#ifdef RELEASE
} catch (std::exception &e) {
SPDLOG_ERROR("exception was caught at task callback: {}", e.what());
SPDLOG_ERROR(
@@ -255,6 +257,7 @@ class Task::Impl {
GetFullID());
emit parent_->SignalTaskEnd();
}
+#endif
}
};