On Tue, Nov 18, 2008 at 8:10 AM, Matt Wilson <[EMAIL PROTECTED]> wrote:
>
> When I leave that 1/0 line in the code, and then view that page
> through my browser, I DO see the typical 500 error message.  I don't
> see anything like a viewable traceback, promised by WebError.
>
> So I think I should have said "what does WebError do?" because it
> seems like I can't get it to do anything.  I'm confident that the
> problem is at my end.

Matt, make sure that the wsgi environ key 'paste.throw_errors' isn't
getting turned on somewhere.  That would disable WebError.

Otherwise, here's a trivial example using paste's httpserver:

from weberror.errormiddleware import ErrorMiddleware
from paste.httpserver import serve

def myapp(environ, start_response):
   start_response('500 Internal Error', [('Content-Type', 'text/plain')])
   1/0 # Raise an exception
   return

# Serve the application. Browse to port 8080 to see the formatted traceback
serve(ErrorMiddleware(myapp, debug=True))

--~--~---------~--~----~------------~-------~--~----~
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