MCPcopy Create free account
hub / github.com/pallets/flask / custom_exception_handler

Function custom_exception_handler

tests/test_user_error_handler.py:15–17  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

13
14 @app.errorhandler(CustomException)
15 def custom_exception_handler(e):
16 assert isinstance(e, CustomException)
17 return "custom"
18
19 with pytest.raises(TypeError) as exc_info:
20 app.register_error_handler(CustomException(), None)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected