mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:18:11 +00:00
LibJS: Use ErrorType::NotAnObjectOfType instead of NotA
This commit is contained in:
parent
9def17d4cb
commit
470262c8ab
40 changed files with 67 additions and 67 deletions
|
@ -38,7 +38,7 @@ TESTJS_GLOBAL_FUNCTION(get_weak_set_size, getWeakSetSize)
|
|||
if (!object)
|
||||
return {};
|
||||
if (!is<JS::WeakSet>(object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WeakSet");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "WeakSet");
|
||||
return {};
|
||||
}
|
||||
auto* weak_set = static_cast<JS::WeakSet*>(object);
|
||||
|
@ -51,7 +51,7 @@ TESTJS_GLOBAL_FUNCTION(get_weak_map_size, getWeakMapSize)
|
|||
if (!object)
|
||||
return {};
|
||||
if (!is<JS::WeakMap>(object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WeakMap");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "WeakMap");
|
||||
return {};
|
||||
}
|
||||
auto* weak_map = static_cast<JS::WeakMap*>(object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue