mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
WebContent+LibWeb+LibJS: Report exceptions to the JS console
Print exceptions passed to `HTML::report_exception` in the JS console Refactored `ExceptionReporter`: in order to report exception now you need to pass the relevant realm in it. For passed `JS::Value` we now create `JS::Error` object to print value as the error message.
This commit is contained in:
parent
2eb6dbd4f0
commit
40aad77ab1
Notes:
sideshowbarker
2024-07-17 05:47:05 +09:00
Author: https://github.com/wentwrong 🔰
Commit: 40aad77ab1
Pull-request: https://github.com/SerenityOS/serenity/pull/15517
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg
14 changed files with 86 additions and 58 deletions
|
@ -133,7 +133,7 @@ JS::Completion ClassicScript::run(RethrowErrors rethrow_errors)
|
|||
dbgln("no rethrow, stat: {}", evaluation_status.value().value().to_string_without_side_effects());
|
||||
|
||||
// 1. Report the exception given by evaluationStatus.[[Value]] for script.
|
||||
report_exception(evaluation_status);
|
||||
report_exception(evaluation_status, settings_object().realm());
|
||||
|
||||
// 2. Clean up after running script with settings.
|
||||
settings.clean_up_after_running_script();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue