mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Creates a speciall error code for unexpected error
The rationale behind this is being able to identify exceptions that we may not be taking into account
This commit is contained in:
@@ -9,5 +9,7 @@ APPOINTMENT_WRONG_FIELD = -7
|
||||
APPOINTMENT_CIPHER_NOT_SUPPORTED = -8
|
||||
APPOINTMENT_HASH_FUNCTION_NOT_SUPPORTED = -9
|
||||
|
||||
# UNHANDLED
|
||||
UNKNOWN_JSON_RPC_EXCEPTION = -99
|
||||
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@ class Inspector:
|
||||
if self.debug:
|
||||
self.logging.error("[Inspector] JSONRPCException. Error code {}".format(e))
|
||||
|
||||
# In case of an unknown exception, assign a special rcode and reason.
|
||||
r = (errors.UNKNOWN_JSON_RPC_EXCEPTION, "Unexpected error occurred")
|
||||
|
||||
return r
|
||||
|
||||
def check_locator(self, locator):
|
||||
|
||||
Reference in New Issue
Block a user