mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Spreadsheet: Use ErrorType::NotAnObjectOfType instead of NotA
This commit is contained in:
parent
1139aa45b6
commit
9def17d4cb
Notes:
sideshowbarker
2024-07-18 04:14:28 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/9def17d4cb6 Pull-request: https://github.com/SerenityOS/serenity/pull/9975 Reviewed-by: https://github.com/linusg ✅
1 changed files with 9 additions and 9 deletions
|
@ -165,7 +165,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::get_real_cell_contents)
|
|||
return JS::js_null();
|
||||
|
||||
if (!is<SheetGlobalObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "SheetGlobalObject");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "SheetGlobalObject");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::set_real_cell_contents)
|
|||
return JS::js_null();
|
||||
|
||||
if (!is<SheetGlobalObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "SheetGlobalObject");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "SheetGlobalObject");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::parse_cell_name)
|
|||
return JS::js_null();
|
||||
|
||||
if (!is<SheetGlobalObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "SheetGlobalObject");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "SheetGlobalObject");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::current_cell_position)
|
|||
return JS::js_null();
|
||||
|
||||
if (!is<SheetGlobalObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "SheetGlobalObject");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "SheetGlobalObject");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_index)
|
|||
|
||||
auto column_name = vm.argument(0);
|
||||
if (!column_name.is_string()) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "String");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "String");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_index)
|
|||
return JS::js_null();
|
||||
|
||||
if (!is<SheetGlobalObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "SheetGlobalObject");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "SheetGlobalObject");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -345,7 +345,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_arithmetic)
|
|||
|
||||
auto column_name = vm.argument(0);
|
||||
if (!column_name.is_string()) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "String");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "String");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -362,7 +362,7 @@ JS_DEFINE_NATIVE_FUNCTION(SheetGlobalObject::column_arithmetic)
|
|||
return JS::js_null();
|
||||
|
||||
if (!is<SheetGlobalObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "SheetGlobalObject");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "SheetGlobalObject");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ JS_DEFINE_NATIVE_FUNCTION(WorkbookObject::sheet)
|
|||
return {};
|
||||
|
||||
if (!is<WorkbookObject>(this_object)) {
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotA, "WorkbookObject");
|
||||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAnObjectOfType, "WorkbookObject");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue