From: Mark Wooding Date: Sat, 8 May 2010 18:43:18 +0000 (+0100) Subject: py/rmcr.py: More useful diagnostics for uncaught exceptions. X-Git-Tag: 1.0.0pre8~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/commitdiff_plain/e41b17c85e858097cf8c077287c4744dd139f3b5?hp=10ca2d4387f34cefb5a83867a16fb8d5eeaf0d24 py/rmcr.py: More useful diagnostics for uncaught exceptions. Well, at least if you turn debugging on. --- diff --git a/py/rmcr.py b/py/rmcr.py index 61521b4d..f73a6cc9 100644 --- a/py/rmcr.py +++ b/py/rmcr.py @@ -136,7 +136,9 @@ class Coroutine (object): (me, args, kwargs)) me._func(*args, **kwargs) except: - _switchto(findvictim(me.parent), None, exc_info()) + exc = exc_info() + _debug(' _start(%s): caught exception (%s)' % (me, exc)) + _switchto(findvictim(me.parent), None, exc) finally: _debug(' _start(%s): finally' % me) _debug(' _start(%s): _onexit = %s' % (me, me._onexit))