From a9fd2453a4e2e985128f4677c4766149ef7b23f2 Mon Sep 17 00:00:00 2001 From: Mihai Parparita Date: Thu, 19 Oct 2023 07:50:58 -0700 Subject: [PATCH] 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. --- main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.cpp b/main.cpp index f779d06..b85ea22 100644 --- a/main.cpp +++ b/main.cpp @@ -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();