Should PyISAPIe bother with exception?

21 views
Skip to first unread message

Yap Sok Ann

unread,
Oct 17, 2011, 10:36:21 PM10/17/11
to PyISAPIe
In WSGI.py, there is an exception handling block in StartResponse:

if ExcInfo:
try:
raise ExcInfo[0], ExcInfo[1], ExcInfo[2]

finally:
ExcInfo = None

With this in place, things like WebError error_log [1] doesn't work
anymore. Is it safe if I just comment out the if-block?

[1] An example .ini for a pyramid-1.0 application

[app:myapp]
use = egg:myapp

[filter:weberror]
use = egg:WebError#error_catcher
debug = false
error_log = /tmp/error.log

[pipeline:main]
pipeline =
weberror
myapp

Phillip Sitbon

unread,
Oct 17, 2011, 11:25:14 PM10/17/11
to pyis...@googlegroups.com
The point of that code was to propagate the error into the DLL, which
doesn't do anything other than display a canned error message when the
request throws an exception.

I don't quite understand your example, but I can say that there's no
problem at all in removing it, especially if you want to use an
external handler and display a custom error message.


Cheers,

Phillip

> --
> You received this message because you are subscribed to the Google Groups "PyISAPIe" group.
> To post to this group, send email to pyis...@googlegroups.com.
> To unsubscribe from this group, send email to pyisapie+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyisapie?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages