Commit a552e3a0 authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

Improve exception handling across rpc interface

Modified Files:
 	rpc.py
parent e87ab3fe
......@@ -208,7 +208,7 @@ class SocketIO:
if how == "EXCEPTION":
mod, name, args, tb = what
self.traceback = tb
if mod:
if mod: # not string exception
try:
__import__(mod)
module = sys.modules[mod]
......@@ -220,7 +220,10 @@ class SocketIO:
except AttributeError:
pass
else:
# instantiate a built-in exception object and raise it
raise getattr(__import__(mod), name)(*args)
name = mod + "." + name
# do the best we can:
raise name, args
if how == "ERROR":
raise RuntimeError, what
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment