Reduce preprocessor coverage to avoid masking source dependencies.
This commit is contained in:
parent
4fdc0ce08e
commit
ea0721138a
1 changed files with 6 additions and 8 deletions
|
@ -14,13 +14,6 @@ nano::thread_runner::thread_runner (boost::asio::io_context & io_ctx_a, unsigned
|
|||
{
|
||||
threads.emplace_back (nano::thread_attributes::get_default (), [this, &io_ctx_a] () {
|
||||
nano::thread_role::set (role);
|
||||
|
||||
// In a release build, catch and swallow any exceptions,
|
||||
// In debug mode let if fall through
|
||||
|
||||
#ifndef NDEBUG
|
||||
run (io_ctx_a);
|
||||
#else
|
||||
try
|
||||
{
|
||||
run (io_ctx_a);
|
||||
|
@ -28,11 +21,16 @@ nano::thread_runner::thread_runner (boost::asio::io_context & io_ctx_a, unsigned
|
|||
catch (std::exception const & ex)
|
||||
{
|
||||
std::cerr << ex.what () << std::endl;
|
||||
#ifndef NDEBUG
|
||||
throw; // Re-throw to debugger in debug mode
|
||||
#endif
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
throw; // Re-throw to debugger in debug mode
|
||||
#endif
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue