summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2002-08-24 23:57:17 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2002-08-24 23:57:17 (GMT)
commita552e3a0c9aaa5f7540262159515c6798e5d8d7e (patch)
tree964d9cf3d09235db4319bd7d4bf03e2849705d1b /Lib/idlelib
parente87ab3fefed00618992f5fe60a95ec9487e6303f (diff)
downloadcpython-a552e3a0c9aaa5f7540262159515c6798e5d8d7e.zip
cpython-a552e3a0c9aaa5f7540262159515c6798e5d8d7e.tar.gz
cpython-a552e3a0c9aaa5f7540262159515c6798e5d8d7e.tar.bz2
Improve exception handling across rpc interface
Modified Files: rpc.py
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/rpc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
index 5bb0e64..922a460 100644
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -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