Source code for pyticketswitch.exceptions

[docs]class PyticketswitchError(Exception): pass
[docs]class APIError(PyticketswitchError): def __init__(self, msg, code=None, response=None, *args, **kwargs): super(APIError, self).__init__(msg, *args, **kwargs) self.msg = msg self.code = code self.response = response
[docs]class AuthenticationError(APIError): pass
[docs]class InvalidParametersError(PyticketswitchError): pass
[docs]class InvalidResponseError(PyticketswitchError): pass
[docs]class InvalidGeoParameters(PyticketswitchError): pass
[docs]class IntegrityError(PyticketswitchError): def __init__(self, message, data, *args): super(IntegrityError, self).__init__(message, *args) self.data = data
[docs]class BackendError(PyticketswitchError): pass
[docs]class BackendBrokenError(BackendError): pass
[docs]class BackendDownError(BackendError): pass
[docs]class BackendThrottleError(BackendError): pass
[docs]class CallbackGoneError(APIError): pass
[docs]class OrderUnavailableError(PyticketswitchError): def __init__(self, msg, reservation=None, meta=None, *args, **kwargs): super(OrderUnavailableError, self).__init__(msg, *args, **kwargs) self.reservation = reservation self.meta = meta