@staticmethod
def make_exception(exceptiontype, data):
    ex = exceptiontype(*data['args'])
    if ('attributes' in data):
        for (attr, value) in data['attributes'].items():
            setattr(ex, attr, value)
    return ex
@staticmethod
def make_exception(exceptiontype, data):
    ex = exceptiontype(*data['args'])
    if ('attributes' in data):
        for (attr, value) in data['attributes'].items():
            setattr(ex, attr, value)
    return ex