def _exception_data():
 (type, value, traceback) = sys.exc_info()
 while traceback.tb_next:
  traceback = traceback.tb_next
 code = traceback.tb_frame.f_code
 return (type.__name__, value, code.co_filename, traceback.tb_lineno, code.co_name)

def _exception_data ( ) : ( type , value , traceback ) = sys . exc_info ( ) while traceback . tb_next : traceback = traceback . tb_next code = traceback . tb_frame . f_code return ( type . __name__ , value , code . co_filename , traceback . tb_lineno , code . co_name )
return exception information: - the exceptions class name; - the exception object; - the name of the file containing the offending code; - the line number of the offending code; - the function name of the offending code .