#NEWLINE# def check_errors( fn ) : #NEWLINE# #INDENT# def wrapper( * args , **kwargs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# fn ( * args , ** kwargs ) #NEWLINE# #UNINDENT# except ( ImportError , IndentationError , NameError , SyntaxError , TypeError , AttributeError ) : #NEWLINE# #INDENT# ( et , ev , tb ) = sys . exc_info ( ) #NEWLINE# if ( getattr ( ev , 'filename' , None ) is None ) : #NEWLINE# #INDENT# filename = traceback . extract_tb ( tb ) [ ( - 1 ) ] [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# filename = ev . filename #NEWLINE# #UNINDENT# if ( filename not in _error_files ) : #NEWLINE# #INDENT# _error_files . append ( filename ) #NEWLINE# #UNINDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# return fn