chiark / gitweb /
py/rmcr.py: More useful diagnostics for uncaught exceptions.
[tripe] / py / rmcr.py
index 61521b4d66c641863b73c29ddab4e50863c1400d..f73a6cc9ab0a99e91935c5cac234573afd3b6070 100644 (file)
@@ -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))