mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS+Everywhere: Convert JS::Error to String
This includes an Error::create overload to create an Error from a UTF-8 StringView. If creating a String from that view fails, the factory will return an OOM InternalError instead. VM::throw_completion can also make use of this overload via its perfect forwarding.
This commit is contained in:
parent
153b793638
commit
88814acbd3
36 changed files with 198 additions and 151 deletions
|
@ -485,7 +485,7 @@ inline JSFileResult TestRunner::run_file_test(DeprecatedString const& test_path)
|
|||
if (is<JS::Error>(error_object)) {
|
||||
auto& error_as_error = static_cast<JS::Error&>(error_object);
|
||||
detail_builder.append('\n');
|
||||
detail_builder.append(error_as_error.stack_string());
|
||||
detail_builder.append(error_as_error.stack_string(*g_vm).release_allocated_value_but_fixme_should_propagate_errors());
|
||||
}
|
||||
|
||||
test_case.details = detail_builder.to_deprecated_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue