aws_lambda_decorators/decorators.py
def handle_all_exceptions():
    """
    Handles all exceptions thrown by the wrapped/decorated function.

    Usage:
        @handle_all_exceptions()
        def lambda_handler(params)
            pass
    """
    def decorator(func):
        def wrapper(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except Exception as ex:  # noqa: pylint - catching-non-exception
                LOGGER.error(str(ex))
                return failure(str(ex))
        return wrapper
    return decorator

    Handles all exceptions thrown by the wrapped/decorated function.

    Usage:
        @handle_all_exceptions()
        def lambda_handler(params)
            pass
    
Handles all exceptions thrown by the wrapped/decorated function.
Handles all exceptions thrown by the wrapped / decorated function .
def handle_all_exceptions():
    def decorator(func):
        def wrapper(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except Exception as ex:  
                LOGGER.error(str(ex))
                return failure(str(ex))
        return wrapper
    return decorator
def handle_all_exceptions ( ) : def decorator ( func ) : def wrapper ( * args , ** kwargs ) : try : return func ( * args , ** kwargs ) except Exception as ex : LOGGER . error ( str ( ex ) ) return failure ( str ( ex ) ) return wrapper return decorator
Handles all exceptions thrown by the wrapped/decorated function.
Handles all exceptions thrown by the wrapped / decorated function .
"""
    Handles all exceptions thrown by the wrapped/decorated function.

    Usage:
        @handle_all_exceptions()
        def lambda_handler(params)
            pass
    """ # noqa: pylint - catching-non-exception