Making pywsgi.WSGIServer re-raise exceptions

30 views
Skip to first unread message

yon ar.c'hall

unread,
Nov 25, 2016, 9:03:52 AM11/25/16
to gevent: coroutine-based Python network library
For testing purpose, is it possible to make pywsgi.WSGIServer re-raise exceptions originating from a handler, instead of just print a traceback ?

I thought first that the use of the "raise_error" parameter of join() or joinall() API would have been useful... in an intent to monkey-patch. However, after digging into the code of gevent, I only found a "spawn" call to the handler (in method baseserver.BaseServer.do_handle()) ; no trace of call to join/joinall => I guess it would have been a bad idea, as it would have blocked ?

From another related post, I noticed the Denis Bilenko's recommandation : using gevent.util.wrap_error()). However, I don't see how it could help me in the present case.

Any advice on that topic ?

-yon

Reply all
Reply to author
Forward
0 new messages