OK, I figured it out, after I found this closed CP issue:
http://www.cherrypy.org/ticket/186
The bottom line -- the default CP behavior is catch all exceptions,
including errors. So that means the wrapping WSGI stuff never gets a
shot to handle the traceback.
But then I opened my config file and added this section:
server.throw_errors = True
And then all was well.
HURRAY!
On Nov 19, 10:38 pm, Matt Wilson <[EMAIL PROTECTED]> wrote:
> Thanks Ken! Your example worked fine for me. Now I'll just go back
> to my original examples and try to figure it out.
>
> On Nov 19, 5:49 pm, "Ken Kuhlman" <[EMAIL PROTECTED]> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---