daemon: prevent json-rpc-pelix from suppressing stack traces of TypeErrors
This commit is contained in:
parent
0f81af0142
commit
65aa87dcdb
@ -282,7 +282,11 @@ class Daemon(DaemonThread):
|
|||||||
kwargs[x] = (config_options.get(x) if x in ['password', 'new_password'] else config.get(x))
|
kwargs[x] = (config_options.get(x) if x in ['password', 'new_password'] else config.get(x))
|
||||||
cmd_runner = Commands(config, wallet, self.network)
|
cmd_runner = Commands(config, wallet, self.network)
|
||||||
func = getattr(cmd_runner, cmd.name)
|
func = getattr(cmd_runner, cmd.name)
|
||||||
result = func(*args, **kwargs)
|
try:
|
||||||
|
result = func(*args, **kwargs)
|
||||||
|
except TypeError as e:
|
||||||
|
# we are catching here because JSON-RPC-Pelix would throw away the trace of e
|
||||||
|
raise Exception("TypeError occured in Electrum") from e
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user