diff options
author | saturneric <[email protected]> | 2023-12-22 16:34:46 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-22 16:34:46 +0000 |
commit | ee1a6bba20d71e710b169269565202d26794f44e (patch) | |
tree | 0f482b49dbbb0d07b9c216c12b6462e83e31673a /src/core/thread/Task.cpp | |
parent | fix: slove cmake configuration problem on macOS (diff) | |
download | GpgFrontend-ee1a6bba20d71e710b169269565202d26794f44e.tar.gz GpgFrontend-ee1a6bba20d71e710b169269565202d26794f44e.zip |
fix: slove compilation issue on macos
Diffstat (limited to 'src/core/thread/Task.cpp')
-rw-r--r-- | src/core/thread/Task.cpp | 5 |
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 } }; |