daemon: prevent json-rpc-pelix from suppressing stack traces of TypeErrors

This commit is contained in:
Janus 2018-06-13 16:26:33 +02:00
parent 0f81af0142
commit 65aa87dcdb

View File

@ -282,7 +282,11 @@ class Daemon(DaemonThread):
kwargs[x] = (config_options.get(x) if x in ['password', 'new_password'] else config.get(x))
cmd_runner = Commands(config, wallet, self.network)
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
def run(self):