Project

General

Profile

« Previous | Next » 

Revision 13

Initial version of xml2db. Doesn't yet handle all duplicate rows correctly.

View differences:

ex_util.py
1 1
# Exception handling
2 2

  
3 3
def add_msg(ex, msg): ex.args = (str(ex).rstrip()+'\n'+msg,)
4

  
5
class ExceptionWithCause(Exception):
6
    def __init__(self, msg, cause=None):
7
        Exception.__init__(self, msg)
8
        if cause != None: add_msg(self, 'cause: '+str(cause))

Also available in: Unified diff