LibJS: Make ParserError::to_string infallible

This commit is contained in:
Shannon Booth 2024-04-05 00:39:53 +02:00 committed by Tim Flynn
commit 0090b916dd
Notes: sideshowbarker 2024-07-16 21:51:02 +09:00
11 changed files with 17 additions and 17 deletions

View file

@ -586,7 +586,7 @@ ThrowCompletionOr<Value> perform_eval(VM& vm, Value x, CallerMode strict_caller,
// b. If script is a List of errors, throw a SyntaxError exception.
if (parser.has_errors()) {
auto& error = parser.errors()[0];
return vm.throw_completion<SyntaxError>(TRY_OR_THROW_OOM(vm, error.to_string()));
return vm.throw_completion<SyntaxError>(error.to_string());
}
bool strict_eval = false;