class_docstr: Test how very generic handlers are dispatched to.
class_docstr_tok: ["Test","how","very","generic","handlers","are","dispatched","to","."]
docstr: Generic ``Exception`` will handle all exceptions directly,
  including ``HTTPExceptions``.
docstr_tok: ["Generic","``","Exception","``","will","handle","all","exceptions","directly",",","including","``","HTTPExceptions","``","."]
code: def test_handle_generic(self, app, client):
      """Generic ``Exception`` will handle all exceptions directly,
      including ``HTTPExceptions``.
      """
  
      @app.errorhandler(Exception)
      def handle_exception(e):
          return self.report_error(e)
  
      assert client.get("/custom").data == b"direct Custom"
      assert client.get("/error").data == b"direct KeyError"
      assert client.get("/abort").data == b"direct InternalServerError"
      assert client.get("/not-found").data == b"direct NotFound"
  
file_path: flask/tests/test_user_error_handler.py
imports: import pytest
  from werkzeug.exceptions import Forbidden
  from werkzeug.exceptions import HTTPException
  from werkzeug.exceptions import InternalServerError
  from werkzeug.exceptions import NotFound
  import flask
label_desc: Use image node_id 5 for calling the TestGenericHandlers obj's underlying member method code with example usage: obj.test_handle_generic(app, client) and returns: self