From e41b17c85e858097cf8c077287c4744dd139f3b5 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sat, 8 May 2010 19:43:18 +0100 Subject: [PATCH] py/rmcr.py: More useful diagnostics for uncaught exceptions. Organization: Straylight/Edgeware From: Mark Wooding Well, at least if you turn debugging on. --- py/rmcr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- [mdw]