Please forgive me if this is documented somewhere or has been asked and 
answered before. I've been searching but haven't been able to find an 
answer.

How do I get django-like error handling with Pyramid, where I can debug 
exceptions with the pyramid debugtoolbar during development, and in 
production send an email and display a nice error message? I've got it 
mostly working. The problem is that I've defined an error handling view 
like so:

@view_config(context=Exception, renderer='templates/500.pt')
def catch_500(request):
    response = request.response
    response.status_int = 500
    return {}

And that works great with pyramid_exclog for sending the email. But when I 
try to run that in development with the pyramid_debugtoolbar included, the 
exception always gets handled by the view. The behaviour I'd like to see is 
for the debugtoolbar to catch the exception before it gets to the exception 
view. When I take out the view definition, the debugtoolbar _will_ catch 
it, so I know I've got the debugtoolbar included correctly. I'm sure this 
is not an unusual request, and I've got to be missing something obvious.

Thanks for your help.

-Brian

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/ZnvEgdOxszoJ.
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/pylons-discuss?hl=en.

Reply via email to