def swallow_exceptions(exn_logger):
    def decor(func):
        def wrapper(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except Exception as e:
                exn_logger.exception(e)
        return wrapper
    return decor
Decorator to catch, log, and discard any Exceptions raised in a method.
dataset/ETHPy150Open dropbox/changes/changes/ext/statsreporter.py/swallow_exceptions