INNER CODE UNIT · Python

handler

falconry/falcon · falcon/app.py:991

            def handler(
                req: _ReqT, resp: _RespT, ex: Exception, params: dict[str, Any]
            ) -> None:
                old_handler(ex, req, resp, params)

            return handler  # type: ignore[return-value]

        if handler is None:
            handler = getattr(exception, 'handle', None)
            if handler is None:
                raise AttributeError(
                    'handler must either be specified explicitly or defined as a '
                    'static method named "handle" that is a member of the given '
                    'exception class.'
                )

        # TODO(vytas): Remove this shimming in a future Falcon version.
        arg_names = tuple(misc.get_argnames(handler))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…