Store std::exception::what() automatically before calling TRAP on unhandled exceptions

* Makes it easier to inspect the message in debuggers
This commit is contained in:
Denis Blank 2020-04-03 17:44:40 +02:00
parent 89031d932c
commit f7e00bcc8d

View File

@ -746,7 +746,8 @@ struct final_callback : util::non_copyable {
try { try {
std::rethrow_exception(exception); std::rethrow_exception(exception);
} catch (std::exception const& unhandled) { } catch (std::exception const& unhandled) {
(void)unhandled; char const* const what = unhandled.what();
(void)what;
CTI_DETAIL_TRAP(); CTI_DETAIL_TRAP();
} catch (...) { } catch (...) {
CTI_DETAIL_TRAP(); CTI_DETAIL_TRAP();