Skip to content

Commit

Permalink
add request.exception and request.exc_info
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Feb 10, 2016
1 parent e40ef23 commit ff3dd9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyramid/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ def invoke_exception_view(
If called with no arguments, it uses the global exception information
returned by ``traceback.exc_info()`` as ``exc_info``, the request
object that the method is a member of as the ``request``, and
``secure`` is ``True``.
object that this method is attached to as the ``request``, and
``True`` for ``secure``.
This method returns a :term:`response` object."""

Expand All @@ -597,6 +597,8 @@ def invoke_exception_view(
exc_info = traceback.exc_info()
context_iface = providedBy(exc_info[0])
view_name = getattr(request, 'view_name', '')
request.exception = exc_info[0]
request.exc_info = exc_info
response = _call_view(
registry,
request,
Expand Down

0 comments on commit ff3dd9e

Please sign in to comment.