mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 11:39:44 +03:00
LibWeb: Don't use C++ name for error messages in generated bindings
This commit is contained in:
parent
a430d78843
commit
65b1229dae
Notes:
sideshowbarker
2024-07-17 05:58:46 +09:00
@ -2735,8 +2735,7 @@ static JS::ThrowCompletionOr<@fully_qualified_name@*> impl_from(JS::VM& vm)
|
||||
|
||||
generator.append(R"~~~(
|
||||
if (!is<@fully_qualified_name@>(this_object))
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@fully_qualified_name@");
|
||||
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@name@");
|
||||
return static_cast<@fully_qualified_name@*>(this_object);
|
||||
}
|
||||
)~~~");
|
||||
@ -3032,7 +3031,7 @@ static JS::ThrowCompletionOr<@fully_qualified_name@*> impl_from(JS::VM& vm)
|
||||
{
|
||||
auto* this_object = TRY(vm.this_value().to_object(vm));
|
||||
if (!is<@fully_qualified_name@>(this_object))
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@fully_qualified_name@");
|
||||
return vm.throw_completion<JS::TypeError>(JS::ErrorType::NotAnObjectOfType, "@name@");
|
||||
return static_cast<@fully_qualified_name@*>(this_object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user