30 LOGGER( slog,
"terminate" );
37 static std::mutex t_using_terminate;
38 std::unique_lock< std::mutex > t_terminate_locked( t_using_terminate );
40 static bool t_tried_throw =
false;
51 catch(
const std::exception &e )
53 LERROR( slog,
"Caught unhandled exception. what(): " << e.what() );
57 LERROR( slog,
"Caught unknown (non-std::exception) & unhandled exception." );
61 int size = backtrace( t_bt_array, 50 );
63 LERROR( slog,
"Backtrace from terminate() returned " 64 << size <<
" frames\n" );
66 char** t_messages = backtrace_symbols( t_bt_array, size );
68 std::stringstream t_bt_str;
69 for(
int i = 0; i < size && t_messages !=
nullptr; ++i )
71 t_bt_str <<
"[bt]: (" << i <<
") " << t_messages[i] <<
'\n';
73 LERROR( slog,
"Backtrace:\n" << t_bt_str.str() );
Contains the logger class and macros, based on Kasper's KLogger class.
LOGGER(slog, "terminate")