Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_types.py

Issue 2751063004: bindings: Stop using strings directly when throwing exceptions (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/idl_types.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/scripts/v8_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py
index dcabd8a5e038f3301eaedd3b72c16e0814113eec..6e1cb2c556771bb86a1f4ad79bf19d1f4524aedd 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py
@@ -580,7 +580,7 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name
if 'FlexibleArrayBufferView' in extended_attributes:
if base_idl_type not in TYPED_ARRAY_TYPES.union(set(['ArrayBufferView'])):
- raise "Unrecognized base type for extended attribute 'FlexibleArrayBufferView': %s" % (idl_type.base_type)
+ raise ValueError("Unrecognized base type for extended attribute 'FlexibleArrayBufferView': %s" % (idl_type.base_type))
base_idl_type = 'FlexibleArrayBufferView'
if idl_type.is_integer_type:
@@ -689,7 +689,7 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl
}
elif 'FlexibleArrayBufferView' in extended_attributes:
if idl_type.base_type not in TYPED_ARRAY_TYPES.union(set(['ArrayBufferView'])):
- raise "Unrecognized base type for extended attribute 'FlexibleArrayBufferView': %s" % (idl_type.base_type)
+ raise ValueError("Unrecognized base type for extended attribute 'FlexibleArrayBufferView': %s" % (idl_type.base_type))
set_expression = cpp_value
else:
assign_expression = cpp_value
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/idl_types.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698