mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Make unhandled JS exception stand out more in debug log
Let's log "unhandled exception" messages in red text so that they stand out better among lots of other debug logging.
This commit is contained in:
parent
5ae384fc33
commit
c4ccbc5b83
Notes:
sideshowbarker
2024-07-18 03:26:25 +09:00
Author: https://github.com/awesomekling
Commit: c4ccbc5b83
1 changed files with 3 additions and 3 deletions
|
@ -654,12 +654,12 @@ JS::Interpreter& Document::interpreter()
|
|||
auto message = object.get_without_side_effects(vm.names.message).value_or(JS::js_undefined());
|
||||
if (name.is_accessor() || message.is_accessor()) {
|
||||
// The result is not going to be useful, let's just print the value. This affects DOMExceptions, for example.
|
||||
dbgln("Unhandled JavaScript exception: {}", value);
|
||||
dbgln("\033[31;1mUnhandled JavaScript exception:\033[0m {}", value);
|
||||
} else {
|
||||
dbgln("Unhandled JavaScript exception: [{}] {}", name, message);
|
||||
dbgln("\033[31;1mUnhandled JavaScript exception:\033[0m [{}] {}", name, message);
|
||||
}
|
||||
} else {
|
||||
dbgln("Unhandled JavaScript exception: {}", value);
|
||||
dbgln("\033[31;1mUnhandled JavaScript exception:\033[0m {}", value);
|
||||
}
|
||||
for (auto& traceback_frame : exception->traceback()) {
|
||||
auto& function_name = traceback_frame.function_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue