瀏覽代碼

Fix: Useless exception print on user-cancellation. Add a missing cancellation point

default_compile_flags
vector-of-bool 4 年之前
父節點
當前提交
50afb22ab5
共有 2 個檔案被更改,包括 5 行新增0 行删除
  1. +1
    -0
      src/dds/build/plan/compile_exec.cpp
  2. +4
    -0
      src/dds/util/parallel.cpp

+ 1
- 0
src/dds/build/plan/compile_exec.cpp 查看文件

update_deps_info(neo::into(env.db), info); update_deps_info(neo::into(env.db), info);
} }


cancellation_point();
// Return whether or not there were any failures. // Return whether or not there were any failures.
return okay; return okay;
} }

+ 4
- 0
src/dds/util/parallel.cpp 查看文件

#include "./parallel.hpp" #include "./parallel.hpp"


#include <dds/util/signal.hpp>

#include <dds/util/log.hpp> #include <dds/util/log.hpp>


using namespace dds; using namespace dds;
void dds::log_exception(std::exception_ptr eptr) noexcept { void dds::log_exception(std::exception_ptr eptr) noexcept {
try { try {
std::rethrow_exception(eptr); std::rethrow_exception(eptr);
} catch (const dds::user_cancelled&) {
// Don't log this one. The user knows what they did
} catch (const std::exception& e) { } catch (const std::exception& e) {
dds_log(error, "{}", e.what()); dds_log(error, "{}", e.what());
} }

Loading…
取消
儲存