Index: Source/bindings/templates/attributes.cpp |
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp |
index 0a627881244a3e6fd9919ff707f22e43ac7988d3..ac76aea37f79ac9d2a05d694145f308337f5a6db 100644 |
--- a/Source/bindings/templates/attributes.cpp |
+++ b/Source/bindings/templates/attributes.cpp |
@@ -262,8 +262,10 @@ v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info |
{# Setter ignores invalid enum values: |
http://www.w3.org/TR/WebIDL/#idl-enums #} |
String string = cppValue; |
- if (!({{attribute.enum_validation_expression}})) |
+ if (!({{attribute.enum_validation_expression}})) { |
+ currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, "The provided value '" + string + "' is not a valid value of type '{{attribute.idl_type}}'.")); |
return; |
+ } |
{% endif %} |
{# Pre-set context #} |
{% if attribute.is_custom_element_callbacks or |