diff options
| author | Chris McDonough <chrism@plope.com> | 2016-02-09 20:42:43 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2016-02-09 20:42:43 -0500 |
| commit | ff3dd9e9431035b479136abcc761a8f20341e3e2 (patch) | |
| tree | 3bed7cfd1acfb900fa7ad71adef8933e90adb56e | |
| parent | e40ef23c9c364249318e030e5f1393a9fff17cdd (diff) | |
| download | pyramid-ff3dd9e9431035b479136abcc761a8f20341e3e2.tar.gz pyramid-ff3dd9e9431035b479136abcc761a8f20341e3e2.tar.bz2 pyramid-ff3dd9e9431035b479136abcc761a8f20341e3e2.zip | |
add request.exception and request.exc_info
| -rw-r--r-- | pyramid/view.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pyramid/view.py b/pyramid/view.py index b09c08ccc..0f1a5e41c 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -583,8 +583,8 @@ class ViewMethodsMixin(object): 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.""" @@ -597,6 +597,8 @@ class ViewMethodsMixin(object): 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, |
