summaryrefslogtreecommitdiff
path: root/docs/api/request.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-08-10 20:20:05 -0400
committerChris McDonough <chrism@plope.com>2011-08-10 20:20:05 -0400
commit995466c6bc0da04f50d2db83af653362a0dadd6f (patch)
treee5e57108a3d751d9e02cbf06ad5eca8902f4a100 /docs/api/request.rst
parent9a8ba2f09fe3791febbfec2ac383c091aacfbf5b (diff)
parent3e3fcdf1376218a4fa6dcffec4f27a41c63d1675 (diff)
downloadpyramid-995466c6bc0da04f50d2db83af653362a0dadd6f.tar.gz
pyramid-995466c6bc0da04f50d2db83af653362a0dadd6f.tar.bz2
pyramid-995466c6bc0da04f50d2db83af653362a0dadd6f.zip
fix merge conflicts
Diffstat (limited to 'docs/api/request.rst')
-rw-r--r--docs/api/request.rst21
1 files changed, 16 insertions, 5 deletions
diff --git a/docs/api/request.rst b/docs/api/request.rst
index 5dfb2ae9a..2ab3977d5 100644
--- a/docs/api/request.rst
+++ b/docs/api/request.rst
@@ -85,6 +85,17 @@
of ``request.exception`` will be ``None`` within response and
finished callbacks.
+ .. attribute:: exc_info
+
+ If an exception was raised by a :term:`root factory` or a :term:`view
+ callable`, or at various other points where :app:`Pyramid` executes
+ user-defined code during the processing of a request, result of
+ ``sys.exc_info()`` will be available as the ``exc_info`` attribute of
+ the request within a :term:`exception view`, a :term:`response callback`
+ or a :term:`finished callback`. If no exception occurred, the value of
+ ``request.exc_info`` will be ``None`` within response and finished
+ callbacks.
+
.. attribute:: response
This attribute is actually a "reified" property which returns an
@@ -180,12 +191,12 @@
object (exposed to view code as ``request.response``) to influence
rendered response behavior.
- .. attribute:: json
+ .. attribute:: json_body
- If the request's ``content_type`` is ``application/json``, this
- attribute will contain the JSON-decoded variant of the request body.
- If the request's ``content_type`` is not ``application/json``, this
- attribute will be ``None``.
+ This property will return the JSON-decoded variant of the request
+ body. If the request body is not well-formed JSON, or there is no
+ body associated with this request, this property will raise an
+ exception. See also :ref:`request_json_body`.
.. note::