def log_function_errors(route_function):
    @wraps(route_function)
    def decorated_function(*args, **kwargs):
        try:
            return route_function(*args, **kwargs)
        except Exception as e:
            _L.error(e, exc_info=True)
            raise

    return decorated_function
Error-logging decorator for functions.
dataset/ETHPy150Open openaddresses/machine/openaddr/ci/__init__.py/log_function_errors