def callit(f, funct):
    try:
        funct(f)
    except (__HOLE__, Exception), err:
        f.write(str(err)+'\n')
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/envirodump.py/callit