Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Classe « Flask »

Méthode flask.Flask.handle_user_exception

Signature de la méthode handle_user_exception

def handle_user_exception(self, e: Exception) -> Union[werkzeug.exceptions.HTTPException, ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int], Tuple[Union[ForwardRef('Response'), ~AnyStr, Dict[str, Any], Generator[~AnyStr, NoneType, NoneType]], int, Union[ForwardRef('Headers'), Dict[str, Union[str, List[str], Tuple[str, ...]]], List[Tuple[str, Union[str, List[str], Tuple[str, ...]]]]]], ForwardRef('WSGIApplication')] 

Description

handle_user_exception.__doc__

This method is called whenever an exception occurs that
        should be handled. A special case is :class:`~werkzeug
        .exceptions.HTTPException` which is forwarded to the
        :meth:`handle_http_exception` method. This function will either
        return a response value or reraise the exception with the same
        traceback.

        .. versionchanged:: 1.0
            Key errors raised from request data like ``form`` show the
            bad key in debug mode rather than a generic bad request
            message.

        .. versionadded:: 0.7