|
@@ -17,77 +17,77 @@ class HTTPError(Exception):
|
|
|
|
|
|
|
|
|
|
class OutOfSequenceError(ProtocolError):
|
|
class OutOfSequenceError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='OUT OF SEQUENCE'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.OUT_OF_SEQUENCE
|
|
self.response_code = STATUS_CODES.OUT_OF_SEQUENCE
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class NotAllowedError(ProtocolError):
|
|
class NotAllowedError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='NOT ALLOWED'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.NOT_ALLOWED
|
|
self.response_code = STATUS_CODES.NOT_ALLOWED
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class InvalidIdError(ProtocolError):
|
|
class InvalidIdError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='INVALID ID'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.INVALID_ID
|
|
self.response_code = STATUS_CODES.INVALID_ID
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class NotRecognizedError(ProtocolError):
|
|
class NotRecognizedError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='NOT RECOGNIZED'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.NOT_RECOGNIZED
|
|
self.response_code = STATUS_CODES.NOT_RECOGNIZED
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class InvalidDataError(ProtocolError):
|
|
class InvalidDataError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='INVALID DATA'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.INVALID_DATA
|
|
self.response_code = STATUS_CODES.INVALID_DATA
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class ComplianceError(ProtocolError):
|
|
class ComplianceError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='COMPLIANCE ERROR'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.COMPLIANCE_ERROR
|
|
self.response_code = STATUS_CODES.COMPLIANCE_ERROR
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class SignalNotSupportedError(ProtocolError):
|
|
class SignalNotSupportedError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='SIGNAL NOT SUPPORTED'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.SIGNAL_NOT_SUPPORTED
|
|
self.response_code = STATUS_CODES.SIGNAL_NOT_SUPPORTED
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class ReportNotSupportedError(ProtocolError):
|
|
class ReportNotSupportedError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='REPORT NOT SUPPORTED'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.REPORT_NOT_SUPPORTED
|
|
self.response_code = STATUS_CODES.REPORT_NOT_SUPPORTED
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class TargetMismatchError(ProtocolError):
|
|
class TargetMismatchError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='TARGET MISMATCH'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.TARGET_MISMATCH
|
|
self.response_code = STATUS_CODES.TARGET_MISMATCH
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class NotRegisteredOrAuthorizedError(ProtocolError):
|
|
class NotRegisteredOrAuthorizedError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='NOT REGISTERED OR AUTHORIZED'):
|
|
super().__init__()
|
|
super().__init__()
|
|
self.response_code = STATUS_CODES.NOT_REGISTERED_OR_AUTHORIZED
|
|
self.response_code = STATUS_CODES.NOT_REGISTERED_OR_AUTHORIZED
|
|
self.response_description = description
|
|
self.response_description = description
|
|
|
|
|
|
|
|
|
|
class DeploymentError(ProtocolError):
|
|
class DeploymentError(ProtocolError):
|
|
- def __init__(self, description=None):
|
|
|
|
|
|
+ def __init__(self, description='DEPLOYMENT ERROR OR OTHER ERROR'):
|
|
super().__init__()
|
|
super().__init__()
|
|
- self.response_code = STATUS_CODES.DEPLOYMENT_ERROR_OTHER
|
|
|
|
|
|
+ self.response_code = STATUS_CODES.DEPLOYMENT_ERROR_OR_OTHER_ERROR
|
|
self.response_description = description
|
|
self.response_description = description
|