proper python3 exception inheritance
parent
6ba0f47b56
commit
55957d6e4e
|
@ -213,10 +213,13 @@ class MessageTimeoutError(Exception):
|
||||||
|
|
||||||
class NegativeResponseError(Exception):
|
class NegativeResponseError(Exception):
|
||||||
def __init__(self, message, service_id, error_code):
|
def __init__(self, message, service_id, error_code):
|
||||||
super(Exception, self).__init__(message)
|
self.message = message
|
||||||
self.service_id = service_id
|
self.service_id = service_id
|
||||||
self.error_code = error_code
|
self.error_code = error_code
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.message
|
||||||
|
|
||||||
class InvalidServiceIdError(Exception):
|
class InvalidServiceIdError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue