forked from orbit-oss/flask
Added docs for the error handler rework
This commit is contained in:
parent
dac45f6c5d
commit
9d3c4bbb8c
3 changed files with 72 additions and 2 deletions
|
|
@ -29,6 +29,21 @@ applications. Instead the new ``LOGGER_HANDLER_POLICY`` configuration can
|
|||
be used to disable the default log handlers and custom log handlers can be
|
||||
set up.
|
||||
|
||||
The behavior of error handlers was changed.
|
||||
The precedence of handlers used to be based on the decoration/call order of
|
||||
:meth:`~flask.Flask.errorhandler` and
|
||||
:meth:`~flask.Flask.register_error_handler`, respectively.
|
||||
Now the inheritance hierarchy takes precedence and handlers for more
|
||||
specific exception classes are executed instead of more general ones.
|
||||
See :ref:`error-handlers` for specifics.
|
||||
|
||||
.. note::
|
||||
|
||||
There used to be a logic error allowing you to register handlers
|
||||
only for exception *instances*. This was unintended and plain wrong,
|
||||
and therefore was replaced with the intended behavior of registering
|
||||
handlers only using exception classes and HTTP error codes.
|
||||
|
||||
.. _upgrading-to-010:
|
||||
|
||||
Version 0.10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue