diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-02-16 14:09:11 -0500 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-02-17 09:14:23 -0500 |
commit | 88814acbd39ba252167e48f48f5b938df142065b (patch) | |
tree | c00f3aba6c299cb6d131204274fa4b4a3e532488 /Userland/Libraries/LibTest | |
parent | 153b7936381916aef185686d84e255380bb80f1d (diff) | |
download | serenity-88814acbd39ba252167e48f48f5b938df142065b.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibTest')
-rw-r--r-- | Userland/Libraries/LibTest/JavaScriptTestRunner.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunner.h b/Userland/Libraries/LibTest/JavaScriptTestRunner.h index a24ffe44c6..107f311524 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunner.h +++ b/Userland/Libraries/LibTest/JavaScriptTestRunner.h @@ -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(); |