Index: Source/bindings/templates/methods.cpp |
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
index bad33cf4a18852f370be7f8fa9d718fe3b4bc0ad..93897490f66485b0f2ddffc754c99c59e1f76b50 100644 |
--- a/Source/bindings/templates/methods.cpp |
+++ b/Source/bindings/templates/methods.cpp |
@@ -12,7 +12,8 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const |
{% else %} |
{% if method.number_of_required_arguments %} |
if (UNLIKELY(info.Length() < {{method.number_of_required_arguments}})) { |
- throwTypeError(ExceptionMessages::failedToExecute("{{method.name}}", "{{interface_name}}", ExceptionMessages::notEnoughArguments({{method.number_of_required_arguments}}, info.Length())), info.GetIsolate()); |
+ exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{method.number_of_required_arguments}}, info.Length())); |
+ exceptionState.throwIfNeeded(); |
return; |
} |
{% endif %} |