I have an exception handling view that handles HTTPNotFound exceptions and calls a Pylons wsgi application using request.get_response(). If request.get_response() raises an exception (eg AttributeError) pyramid_exclog is never called. It is called for the HTTPNotFound exception (and ignored), but does not get called again when the exception view raises an exception.
WebError correctly handled this scenario, but I'm guessing this has something to do with the difference between a Tween and WSGI Middleware?
I'm just going to add WebError to the Pylons application's middleware.py, but any clarification about why the exclog tween doesn't work would be greatly appreciated.
--Jason