Hello,
I’ve got the following exception view:
@view_config(
context=Exception,
permission=NO_PERMISSION_REQUIRED,
)
def handle_exception(exc, request):
"""Last resort view function."""
…
I had assumed that the `request` parameter here is the same instance as the
`request` parameter from the view function that raised the exception.
However, that does not seem to be the case. (In fact, the SQLAlchemy
session bound to the view function’s request has been expired by the time
the exception view is entered.)
While a normal view function’s `request` parameter is of type
*pyramid.request.Request*, the exception view’s is of type
*pyramid.util.Request*. Which doesn’t seem to exist though: *AttributeError:
module 'pyramid.util' has no attribute 'Request'*
It would be helpful if the docs would shed more light on this. Any more
details would be great!
Thanks!
Jens
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylons-discuss/7595cf58-f523-4c4e-b78e-5e64850d6e9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.