Skip to content

Commit

Permalink
LibWeb: Don't use C++ name for error messages in generated bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
linusg committed Mar 5, 2023
1 parent a430d78 commit 65b1229
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
)~~~");
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 65b1229

Please sign in to comment.