"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/errorhandling.rst" between
flask-1.1.1.tar.gz and flask-1.1.2.tar.gz

About: Flask is a lightweight Python WSGI web application framework.

errorhandling.rst  (flask-1.1.1):errorhandling.rst  (flask-1.1.2)
skipping to change at line 211 skipping to change at line 211
```````````````````` ````````````````````
When there is no error handler registered for an exception, a 500 When there is no error handler registered for an exception, a 500
Internal Server Error will be returned instead. See Internal Server Error will be returned instead. See
:meth:`flask.Flask.handle_exception` for information about this :meth:`flask.Flask.handle_exception` for information about this
behavior. behavior.
If there is an error handler registered for ``InternalServerError``, If there is an error handler registered for ``InternalServerError``,
this will be invoked. As of Flask 1.1.0, this error handler will always this will be invoked. As of Flask 1.1.0, this error handler will always
be passed an instance of ``InternalServerError``, not the original be passed an instance of ``InternalServerError``, not the original
unhandled error. The original error is available as ``e.original_error``. unhandled error. The original error is available as ``e.original_exception``.
Until Werkzeug 1.0.0, this attribute will only exist during unhandled Until Werkzeug 1.0.0, this attribute will only exist during unhandled
errors, use ``getattr`` to get access it for compatibility. errors, use ``getattr`` to get access it for compatibility.
.. code-block:: python .. code-block:: python
@app.errorhandler(InternalServerError) @app.errorhandler(InternalServerError)
def handle_500(e): def handle_500(e):
original = getattr(e, "original_exception", None) original = getattr(e, "original_exception", None)
if original is None: if original is None:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)