Commit Graph

20 Commits

Author SHA1 Message Date
Qingpeng Li 1e5dd43022
refactor error checks in register_error_handler
Co-authored-by: David Lord <davidism@gmail.com>
2022-05-03 11:52:11 -06:00
jackwardell 846ee2c62e
add assert message for errorhandler exception type 2020-04-16 10:49:42 -07:00
David Lord f2f027d1fb
remove unused module docstrings 2020-04-04 12:28:08 -07:00
David Lord 2ae740dd49
f-strings everywhere 2020-04-04 12:10:00 -07:00
David Lord 524fd0bc8c
apply pyupgrade 2020-04-04 12:10:00 -07:00
David Lord 1351d0a565
Merge branch '1.0.x' 2019-06-23 16:57:52 -07:00
David Lord e666f7a69c
standardize license and copyright 2019-06-22 13:09:09 -07:00
David Lord 9054f6d639
always pass InternalServerError instance to 500 handler 2019-06-19 14:52:25 -07:00
David Lord 43483683b2
apply reorder-python-imports pre-commit config 2019-06-01 09:07:20 -07:00
Jon S. Stumpf b46f5942a5
address flake8 issues 2019-06-01 06:31:35 -07:00
David Baumgold 025589ee76 Reformat with black
https://github.com/python/black
2019-05-06 16:28:58 -04:00
David Lord 662ce2151d
add changelog for GH-2986 2019-01-07 09:52:54 -08:00
Jimmy Jia b92b2e6c74
Do not handle RoutingExceptions with app error handlers 2019-01-07 09:01:37 -08:00
David Lord 310fbfcf64
revert copyright year to project start
add copyright header to files
2018-02-08 12:43:30 -08:00
Christian Stade-Schuldt 5b0b9717da DRYing up the test suite using pytest fixtures (#2306)
* add fixtures to conftest.py

* use fixtures in test_appctx.py

* use fixtures in test_blueprints.py

* use fixtures in test_depreciations.py

* use fixtures in test_regressions.py

* use fixtures in test_reqctx.py

* use fixtures in test_templating.py

* use fixtures in test_user_error_handler.py

* use fixtures in test_views.py

* use fixtures in test_basics.py

* use fixtures in test_helpers.py

* use fixtures in test_testing.py

* update conftest.py

* make docstrings  PEP-257 compliant

* cleanup

* switch dictonary format

* use pytest parameterization for test_json_as_unicode
2017-05-23 15:18:39 -07:00
cerickson 4f815015b8 Added support for generic HTTPException handlers on app and blueprints
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
2017-05-23 10:45:42 -07:00
Florian Sachs 668061a5fc Register errorhandlers for Exceptions
Allow a default errorhandler by registering
an errorhandler for HTTPException

tests included
2017-05-23 10:34:31 -07:00
Joshua Carp 348bf52188 Handle empty deque on errorhandler lookup.
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.
2015-06-02 16:13:30 -04:00
Markus Unterwaditzer 0bac2ade91 Fix formatting errors 2015-04-11 20:52:47 +02:00
Phil Schaf fd8e6b26f9 removed ExceptionHandlerDict 2015-04-11 14:05:22 +02:00