mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #8810: tests: Add exception error message for JSONRPCException
42f6aed
tests: Add exception error message for JSONRPCException (Wladimir J. van der Laan)
This commit is contained in:
parent
ec9de93aee
commit
acf0295014
@ -55,7 +55,11 @@ log = logging.getLogger("BitcoinRPC")
|
||||
|
||||
class JSONRPCException(Exception):
|
||||
def __init__(self, rpc_error):
|
||||
Exception.__init__(self)
|
||||
try:
|
||||
errmsg = '%(message)s (%(code)i)' % rpc_error
|
||||
except (KeyError, TypeError):
|
||||
errmsg = ''
|
||||
Exception.__init__(self, errmsg)
|
||||
self.error = rpc_error
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user