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