diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2002-08-24 23:57:17 +0000 |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2002-08-24 23:57:17 +0000 |
commit | dddc35356dd2029901edfaac483184d6b2a9cf6e (patch) | |
tree | d5da7746a3155eb535877975e10ca32429917e1f | |
parent | 437ad175a5ae7e7551f97b269e246b4d643387fc (diff) | |
download | cpython-dddc35356dd2029901edfaac483184d6b2a9cf6e.tar.gz |
Improve exception handling across rpc interface
Modified Files:
rpc.py
-rw-r--r-- | Lib/idlelib/rpc.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index 5bb0e646f1..922a460c0c 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 |