summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibMain/Main.cpp
diff options
context:
space:
mode:
authorJames Puleo <james@jame.xyz>2021-12-21 23:51:23 -0500
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-21 22:50:12 -0800
commitb19efc4db62094ecf98897e08c6baee2032f6e1a (patch)
tree6b5ef0f69bfd60c77a2c600a58ed7597a5976921 /Userland/Libraries/LibMain/Main.cpp
parent1145638de5ecc851df5c57af14b2b051e3af799d (diff)
downloadserenity-b19efc4db62094ecf98897e08c6baee2032f6e1a.zip
LibMain: Don't `dbgln` runtime errors if not on Serenity
When on Lagom, `warnln` and `dbgln` both output to `stderr`. This makes runtime errors duplicated and more verbose than necessary.
Diffstat (limited to 'Userland/Libraries/LibMain/Main.cpp')
-rw-r--r--Userland/Libraries/LibMain/Main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibMain/Main.cpp b/Userland/Libraries/LibMain/Main.cpp
index a61bbc041f..2a4cf8371e 100644
--- a/Userland/Libraries/LibMain/Main.cpp
+++ b/Userland/Libraries/LibMain/Main.cpp
@@ -25,7 +25,9 @@ int main(int argc, char** argv)
if (result.is_error()) {
auto error = result.release_error();
warnln("Runtime error: {}", error);
+#ifdef __serenity__
dbgln("\033[31;1mExiting with runtime error\033[0m: {}", error);
+#endif
return 1;
}
return result.value();