mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 08:48:49 +00:00
LibJS: Make ParserError::to_string infallible
This commit is contained in:
parent
d568b15acf
commit
0090b916dd
Notes:
sideshowbarker
2024-07-16 21:51:02 +09:00
Author: https://github.com/shannonbooth
Commit: 0090b916dd
Pull-request: https://github.com/SerenityOS/serenity/pull/23817
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/trflynn89
11 changed files with 17 additions and 17 deletions
|
@ -59,7 +59,7 @@ JS::NonnullGCPtr<ClassicScript> ClassicScript::create(ByteString filename, Strin
|
|||
dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Failed to parse: {}", parse_error.to_byte_string());
|
||||
|
||||
// 1. Set script's parse error and its error to rethrow to result[0].
|
||||
script->set_parse_error(JS::SyntaxError::create(environment_settings_object.realm(), parse_error.to_string().release_value_but_fixme_should_propagate_errors()));
|
||||
script->set_parse_error(JS::SyntaxError::create(environment_settings_object.realm(), parse_error.to_string()));
|
||||
script->set_error_to_rethrow(script->parse_error());
|
||||
|
||||
// 2. Return script.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue