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

Unified Diff: third_party/WebKit/Source/bindings/scripts/idl_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 | « no previous file | third_party/WebKit/Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/scripts/idl_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/idl_types.py b/third_party/WebKit/Source/bindings/scripts/idl_types.py
index 104e020e0963c2d36082e593104011c41c378e93..9ba59ed9fb96acded2d11d9a90bdb3486048bda4 100644
--- a/third_party/WebKit/Source/bindings/scripts/idl_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/idl_types.py
@@ -345,7 +345,7 @@ class IdlUnionType(IdlTypeBase):
def single_matching_member_type(self, predicate):
matching_types = filter(predicate, self.flattened_member_types)
if len(matching_types) > 1:
- raise "%s is ambigious." % self.name
+ raise ValueError('%s is ambiguous.' % self.name)
return matching_types[0] if matching_types else None
@property
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698