[Grok-dev] How do I get the stack trace in an exception view?

Sebastian Ware sebastian at urbantalk.se
Mon Mar 22 07:31:09 EDT 2010


I found that I can use the standard python traceback module here...

   http://docs.python.org/library/traceback.html

Mvh Sebastian

22 mar 2010 kl. 12.16 skrev Sebastian Ware:

> I need the stacktrace and other info on the exception, but the context
> of an exception view has hardly anything to go on. Any hints?
>
> from zope.interface.common.interfaces import IException
> class ExceptionView(grok.View):
>     grok.context(IException)
>     grok.name("index.html")
>     grok.require('zope.Public')
>
>     def render(self):
> 	return "Stack trace..."
>
> Mvh Sebastian
>
>
>
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list