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:
Sergi Delgado Segura
2019-08-12 14:05:04 +01:00
parent 69e361f46e
commit a4350f0c35
2 changed files with 5 additions and 0 deletions

View File

@@ -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):