[Idle-dev] CVS: idle rpc.py,1.5,1.6
Kurt B. Kaiser
kbk@users.sourceforge.net
Sat, 24 Aug 2002 16:57:20 -0700
Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv12569
Modified Files:
rpc.py
Log Message:
Improve exception handling across rpc interface
Modified Files:
rpc.py
Index: rpc.py
===================================================================
RCS file: /cvsroot/idlefork/idle/rpc.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** rpc.py 5 Aug 2002 03:52:10 -0000 1.5
--- rpc.py 24 Aug 2002 23:57:17 -0000 1.6
***************
*** 209,213 ****
mod, name, args, tb = what
self.traceback = tb
! if mod:
try:
__import__(mod)
--- 209,213 ----
mod, name, args, tb = what
self.traceback = tb
! if mod: # not string exception
try:
__import__(mod)
***************
*** 221,225 ****
--- 221,228 ----
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":