From 6c0d71d795b314baec38b4d4cd8ae61ee9941d1e Mon Sep 17 00:00:00 2001 From: Epicalert Date: Fri, 2 Jul 2021 03:02:50 +0800 Subject: [PATCH] Say "(fatal)" in console when fatal error occurs --- src/error.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/error.cpp b/src/error.cpp index 7be1ac2..55c73e0 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -9,7 +9,9 @@ void showError(std::string message, std::string titleMessage, bool fatal = true) boxer::show(message.c_str(), titleMessage.c_str(), boxer::Style::Error); #endif - std::cerr << "ERROR: " << message << std::endl; + std::cerr << "ERROR"; + if (fatal) std::cerr << "(fatal)"; + std::cerr << ": " << message << std::endl; if (fatal) { std::abort();