1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibJS: Add ErrorType::ConstructorWithoutNew

...and use it in Proxy::call(), rather than having a specific error
type just for that.
This commit is contained in:
Linus Groh 2020-12-02 09:39:20 +00:00 committed by Andreas Kling
parent 7fb299fe46
commit 1bff65c591
3 changed files with 4 additions and 3 deletions

View file

@ -50,7 +50,8 @@ ProxyConstructor::~ProxyConstructor()
Value ProxyConstructor::call()
{
vm().throw_exception<TypeError>(global_object(), ErrorType::ProxyCallWithNew);
auto& vm = this->vm();
vm.throw_exception<TypeError>(global_object(), ErrorType::ConstructorWithoutNew, vm.names.Proxy);
return {};
}