Re: Assigning a function to sys.excepthook doesn't work in WSGI

2015-02-18 Thread Alexander Sh
On Wednesday, February 18, 2015 at 7:52:19 PM UTC+3, Ian wrote: > > sys.excepthook is called just before the interpreter exits due to an > exception. In a mod_wsgi environment, having the interpreter exit just > because of an exception would be undesirable. I don't know exactly > what it's doing u

Re: Assigning a function to sys.excepthook doesn't work in WSGI

2015-02-18 Thread Ian Kelly
On Wed, Feb 18, 2015 at 8:08 AM, wrote: > I want to generate an html page with http response status '200 OK' in case of > an uncaught exception in my wsgi application, instead of web server's > standard '500 Internal Server Error' response for such case. To do so, I've > made the following sam

Assigning a function to sys.excepthook doesn't work in WSGI

2015-02-18 Thread tak . govoril
I want to generate an html page with http response status '200 OK' in case of an uncaught exception in my wsgi application, instead of web server's standard '500 Internal Server Error' response for such case. To do so, I've made the following sample code: import sys def application(environ, st