def warn_exception(func, *args, **kwargs):
    try:
        return func(*args, **kwargs)
    except:
        warn("%s('%s') ignored" % sys.exc_info()[0:2])
executes the given function, catches all exceptions and converts to a warning.
dataset/ETHPy150Open ralfonso/theory/theory/model/mpdutil.py/warn_exception