Index: Source/bindings/dart/scripts/templates/methods_cpp.template |
diff --git a/Source/bindings/dart/scripts/templates/methods_cpp.template b/Source/bindings/dart/scripts/templates/methods_cpp.template |
index 75c15f5576480f88b4550d10bf045f634eaaafae..fcc061456e5aefb54e6078236812c63aa4510576 100644 |
--- a/Source/bindings/dart/scripts/templates/methods_cpp.template |
+++ b/Source/bindings/dart/scripts/templates/methods_cpp.template |
@@ -247,6 +247,11 @@ if (exception) |
goto fail; |
{% endif %} |
{{argument.local_cpp_type}} {{argument.name}} = {{argument.dart_value_to_local_cpp_value}}; |
+{% if argument.enum_validation_expression %} |
+if (!({{argument.enum_validation_expression}})) { |
+ exception = Dart_NewStringFromCString("param {{argument.arg_index}} not valid"); |
+} |
+{% endif %} |
{% endif %} |
{% endif %}{# argument.is_callback_interface #} |
if (exception) |