Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None
Corresponding tests also added.
Ref issue #941, pr #1383, #2082, #2144
Error handlers are now returned in order of blueprint:code, app:code,
blueprint:HTTPException, app:HTTPException, None
Corresponding tests also added.
Ref issue #941, pr #1383, #2082, #2144
After registering a custom errorhandler by exception class, raising any
unhandled exception in a view function swallows the error and instead
throws an `IndexError` on trying to look up the appropriate handler.
This patch avoids the uninformative `IndexError` and preserves the
original exception by looping until the deque of classes is empty, not
forever.