import sys
import linecache
import traceback

def failure(e):
    exc_type, exc_obj, tb=sys.exc_info()
    lineno = tb.tb_lineno
    print(str(lineno) + ":" + str(type(e)))
    # traceback.print_exc()
    # exit(-1)