diff options
| author | Chris McDonough <chrism@plope.com> | 2011-06-20 00:37:59 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-06-20 00:37:59 -0400 |
| commit | d69ae60b9a195c7cb72122b59335ba886bfffe50 (patch) | |
| tree | 30604c928e55877499cf5c5d8d045ebe1615999a /docs | |
| parent | 22bac63ecd35deac5f580c2d081b11c2caea4045 (diff) | |
| download | pyramid-d69ae60b9a195c7cb72122b59335ba886bfffe50.tar.gz pyramid-d69ae60b9a195c7cb72122b59335ba886bfffe50.tar.bz2 pyramid-d69ae60b9a195c7cb72122b59335ba886bfffe50.zip | |
- Register the default exception view for context of
webob.exc.WSGIHTTPException (convenience).
- Use ``exc.message`` in docs rather than ``exc.args[0]`` now that
we control this.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/hooks.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index e5b85dfbf..1c8a64fd7 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -59,7 +59,7 @@ Here's some sample code that implements a minimal NotFound view callable: :term:`request`. The ``exception`` attribute of the request will be an instance of the :exc:`~pyramid.httpexceptions.HTTPNotFound` exception that caused the not found view to be called. The value of - ``request.exception.args[0]`` will be a value explaining why the not found + ``request.exception.message`` will be a value explaining why the not found error was raised. This message will be different when the ``debug_notfound`` environment setting is true than it is when it is false. @@ -125,8 +125,9 @@ Here's some sample code that implements a minimal forbidden view: :term:`request`. The ``exception`` attribute of the request will be an instance of the :exc:`~pyramid.httpexceptions.HTTPForbidden` exception that caused the forbidden view to be called. The value of - ``request.exception.args[0]`` will be a value explaining why the forbidden - was raised. This message will be different when the + ``request.exception.message`` will be a value explaining why the forbidden + was raised and ``request.exception.result`` will be extended information + about the forbidden exception. These messages will be different when the ``debug_authorization`` environment setting is true than it is when it is false. |
