Hello,
Following the examples of how to implement an exception view (see here
<https://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/pylons/exceptions.html#exception-views>
or here
<https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/views.html#custom-exception-views>),
I have the following code:
@view_config(
context=Exception,
permission=NO_PERMISSION_REQUIRED,
)
def handle_exception(exc, request):
"""Last resort to handle view exceptions."""
…
However, as it turns out the `request` parameter passed into the above view
function is a *<class 'pyramid.util.Request'>* and not an instance of
*pyramid.request.Request*. Yet, printing the request parameter dumps
request information.
It would be good if the documentation would shed more light on this
behavior. I had assumed that the request parameter is the same *Request*
instance from the view function where the exception was raised. But that
seems not to be the case?
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/30257edc-8516-44cb-ac6d-a02d8107565f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.