1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

LibJS: Use String::formatted() for throw_exception() message

This commit is contained in:
Linus Groh 2020-10-04 13:55:20 +01:00 committed by Andreas Kling
parent a27668cbae
commit f9eaac62d9
15 changed files with 64 additions and 64 deletions

View file

@ -462,7 +462,7 @@ void ProxyObject::visit_children(Cell::Visitor& visitor)
Value ProxyObject::call()
{
if (!is_function()) {
vm().throw_exception<TypeError>(global_object(), ErrorType::NotAFunction, Value(this).to_string_without_side_effects().characters());
vm().throw_exception<TypeError>(global_object(), ErrorType::NotAFunction, Value(this).to_string_without_side_effects());
return {};
}
if (m_is_revoked) {
@ -495,7 +495,7 @@ Value ProxyObject::construct(Function& new_target)
{
auto& vm = this->vm();
if (!is_function()) {
vm.throw_exception<TypeError>(global_object(), ErrorType::NotAConstructor, Value(this).to_string_without_side_effects().characters());
vm.throw_exception<TypeError>(global_object(), ErrorType::NotAConstructor, Value(this).to_string_without_side_effects());
return {};
}
if (m_is_revoked) {