Make assertion messages more visible when we drop into the debugger.

Log output may be sent to a file, ensure that the reason why we're
aborting execution is visible.
This commit is contained in:
Mihai Parparita 2023-10-19 07:50:58 -07:00
parent ea0eae467d
commit a9fd2453a4

View File

@ -180,6 +180,9 @@ int main(int argc, char** argv) {
// graceful handling of fatal errors
loguru::set_fatal_handler([](const loguru::Message& message) {
// Make sure the reason for the failure is visible (it may have been
// sent to the logfile only).
cerr << message.preamble << message.indentation << message.prefix << message.message << endl;
enter_debugger();
abort();