From 68b303afa462db0cdfb903e02e65813a08f2e0cf Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 29 Feb 2016 21:20:35 -0600 Subject: add exception and exc_info to request --- pyramid/view.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyramid/view.py b/pyramid/view.py index 822fb29d6..589b13578 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -606,6 +606,8 @@ class ViewMethodsMixin(object): # have been mutated by the view, and its state is not # sane (e.g. caching headers) with hide_attrs(request, 'exception', 'exc_info', 'response'): + attrs['exception'] = exc_info[0] + attrs['exc_info'] = exc_info # we use .get instead of .__getitem__ below due to # https://github.com/Pylons/pyramid/issues/700 request_iface = attrs.get('request_iface', IRequest) -- cgit v1.2.3