Say "(fatal)" in console when fatal error occurs

This commit is contained in:
Epicalert 2021-07-02 03:02:50 +08:00
parent 2206780a9b
commit 6c0d71d795
No known key found for this signature in database
GPG key ID: CAA46F858D0979BD

View file

@ -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); boxer::show(message.c_str(), titleMessage.c_str(), boxer::Style::Error);
#endif #endif
std::cerr << "ERROR: " << message << std::endl; std::cerr << "ERROR";
if (fatal) std::cerr << "(fatal)";
std::cerr << ": " << message << std::endl;
if (fatal) { if (fatal) {
std::abort(); std::abort();