Skip to content
Snippets Groups Projects
Commit 8eee7271 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Updated exception reporter to new way of catching exceptions.

parent 785dea0e
No related branches found
No related tags found
No related merge requests found
......@@ -470,7 +470,7 @@ class BisonParser(object):
raise ParserSyntaxError(msg)
print >>sys.stderr, msg
elif isinstance(error[0], int):
elif hasattr(error, '__getitem__') and isinstance(error[0], int):
msg = 'Line %d: "%s" near "%s"' % error
if not self.interactive:
......@@ -480,9 +480,9 @@ class BisonParser(object):
else:
print error
if not self.interactive:
raise error[3]
raise error.value
traceback.print_exception(*error[:2])
traceback.print_exception(*error.traceback_info)
def toxml(self):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment