daemon: forward TypeError trace to client

This commit is contained in:
Janus 2019-01-25 15:31:45 +01:00
parent 4c6379a936
commit 2737744bfe

View File

@ -294,7 +294,10 @@ 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:
raise Exception("Wrapping TypeError to prevent JSONRPC-Pelix from hiding traceback") from e
return result
def run(self):