mirror of
https://github.com/gabime/spdlog.git
synced 2025-03-15 10:39:53 +08:00
rethrnow non std exceptions to fix #533
This commit is contained in:
parent
8e3b1338a5
commit
e9635c7b2d
@ -71,11 +71,12 @@
|
||||
printf("spdlog fatal error: %s\n", ex.what()); \
|
||||
std::abort(); \
|
||||
} while (0)
|
||||
#define SPDLOG_CATCH_ALL()
|
||||
#define SPDLOG_CATCH_STD
|
||||
#else
|
||||
#define SPDLOG_TRY try
|
||||
#define SPDLOG_THROW(ex) throw(ex)
|
||||
#define SPDLOG_CATCH_ALL() catch (...)
|
||||
#define SPDLOG_CATCH_STD \
|
||||
catch (const std::exception &) {}
|
||||
#endif
|
||||
|
||||
namespace spdlog {
|
||||
|
@ -49,7 +49,7 @@ SPDLOG_INLINE thread_pool::~thread_pool()
|
||||
t.join();
|
||||
}
|
||||
}
|
||||
SPDLOG_CATCH_ALL() {}
|
||||
SPDLOG_CATCH_STD
|
||||
}
|
||||
|
||||
void SPDLOG_INLINE thread_pool::post_log(async_logger_ptr &&worker_ptr, const details::log_msg &msg, async_overflow_policy overflow_policy)
|
||||
|
@ -31,7 +31,8 @@
|
||||
} \
|
||||
catch (...) \
|
||||
{ \
|
||||
err_handler_("Unknown exception in logger"); \
|
||||
err_handler_("Rethrowing unknown exception in logger"); \
|
||||
throw; \
|
||||
}
|
||||
#else
|
||||
#define SPDLOG_LOGGER_CATCH()
|
||||
|
Loading…
Reference in New Issue
Block a user