[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - connection.py:1.5
Jeremy Hylton
jeremy@zope.com
Thu, 1 Aug 2002 14:46:52 -0400
Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv8723
Modified Files:
connection.py
Log Message:
Make doubly sure that SystemExit isn't caught be generic error handling.
=== ZODB3/ZEO/zrpc/connection.py 1.4 => 1.5 ===
meth = getattr(self.obj, name)
try:
ret = meth(*args)
+ except (SystemExit, KeyboardInterrupt):
+ raise
except Exception, msg:
- error = sys.exc_info()[:2]
- log("%s() raised exception: %s" % (name, msg),
- zLOG.ERROR, error=sys.exc_info())
- return self.return_error(msgid, flags, error[0], error[1])
+ error = sys.exc_info()
+ log("%s() raised exception: %s" % (name, msg), zLOG.ERROR,
+ error=error)
+ error = error[:2]
+ return self.return_error(msgid, flags, *error)
if flags & ASYNC:
if ret is not None:
@@ -186,7 +189,9 @@
self.send_reply(msgid, ret)
def handle_error(self):
- self.log_error()
+ if sys.exc_info()[0] == SystemExit:
+ raise sys.exc_info()
+ self.log_error("Error caught in asyncore")
self.close()
def log_error(self, msg="No error message supplied"):