I'm trying to mail myself the stack trace, should an exception occur in
production servers, like I'm used to do with other programs.

Following http://docs.turbogears.org/1.0/ErrorHandling, I set up a test
controller:

> class Root(controllers.RootController):
>     def exc_handler(self, tg_exceptions=None):
>         tb = traceback.format_exception(*sys.exc_info())
>         import pdb; pdb.set_trace()
>         return dict(handling_value=True, exceptions=str(tg_exceptions))
>
>     @expose()
>     @exception_handler(exc_handler)
>     def exceptional(self):
>         raise ValueError("BOOOH!")


At the breakpoint, the exception I see is

(Pdb) tb
['Traceback (most recent call last):\n', '  File "_speedups.pyx", line
278, in _speedups.__getitem__\n', 'KeyError: 8\n']

I guess at this time the original exception is lost, isn't it?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to