Project

General

Profile

« Previous | Next » 

Revision 1518

xml_func.py: SyntaxException: Inherit from exc.ExceptionWithCause so the traceback will be populated with the cause's traceback instead of the SyntaxException wrapper's traceback

View differences:

lib/xml_func.py
16 16

  
17 17
##### Exceptions
18 18

  
19
class SyntaxException(Exception):
19
class SyntaxException(exc.ExceptionWithCause):
20 20
    def __init__(self, cause):
21
        Exception.__init__(self, 'Invalid XML function syntax: '
21
        exc.ExceptionWithCause.__init__(self, 'Invalid XML function syntax: '
22 22
            +exc.str_(cause))
23 23

  
24 24
class FormatException(SyntaxException): pass

Also available in: Unified diff