1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:58:11 +00:00

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.
This commit is contained in:
James Puleo 2021-12-21 23:51:23 -05:00 committed by Brian Gianforcaro
parent 1145638de5
commit b19efc4db6

View file

@ -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();