| | |
| | | """ A :term:`tween` factory which produces a tween that catches an |
| | | exception raised by downstream tweens (or the main Pyramid request |
| | | handler) and, if possible, converts it into a Response using an |
| | | :term:`exception view`.""" |
| | | :term:`exception view`. |
| | | |
| | | .. versionchanged:: 1.9 |
| | | The ``request.response`` will be remain unchanged even if the tween |
| | | handles an exception. Previously it was deleted after handling an |
| | | exception. |
| | | |
| | | Also, ``request.exception`` and ``request.exc_info`` are only set if |
| | | the tween handles an exception and returns a response otherwise they |
| | | are left at their original values. |
| | | |
| | | """ |
| | | |
| | | def excview_tween(request): |
| | | try: |