aboutsummaryrefslogtreecommitdiffstats
path: root/tools/asn2wrs.py
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@ericsson.com>2010-12-23 23:36:48 +0000
committerBalint Reczey <balint.reczey@ericsson.com>2010-12-23 23:36:48 +0000
commit04386e3ca1f9796dfbbca8d0ac25e6a16ab8996f (patch)
tree94556249ed5b246b89b9b859fe4980e5ea27a106 /tools/asn2wrs.py
parent158e9a3dae519e726743340dec67b1fc27a057f4 (diff)
Raise Exceptions containing a string instead of string exceptions
This fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4846 svn path=/trunk/; revision=35258
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-xtools/asn2wrs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index 7302d78450..783dbf48a6 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -443,7 +443,7 @@ class Ctx:
if ident in self.assignments:
raise DuplicateError("assignment", ident)
if ident in self.defined_dict:
- raise "cross-module duplicates for " + ident
+ raise Exception("cross-module duplicates for %s" % ident)
self.defined_dict [ident] = 1
self.assignments[ident] = val
self.dependencies [ident] = dependencies
@@ -843,7 +843,7 @@ class EthCtx:
def dummy_import_type(self, ident):
# dummy imported
if ident in self.type:
- raise "Try to dummy import for existing type :" + ident
+ raise Exception("Try to dummy import for existing type :%s" % ident)
ethtype = asn2c(ident)
self.type[ident] = {'import' : 'xxx', 'proto' : 'xxx',
'ethname' : ethtype }