#NEWLINE# def format_exception( self ) : #NEWLINE# #INDENT# '\n        Return the same data as from traceback.format_exception.\n        ' #NEWLINE# import traceback #NEWLINE# frames = self . get_traceback_frames ( ) #NEWLINE# tb = [ ( f [ 'filename' ] , f [ 'lineno' ] , f [ 'function' ] , f [ 'context_line' ] ) for f in frames ] #NEWLINE# list = [ 'Traceback (most recent call last):\n' ] #NEWLINE# list += traceback . format_list ( tb ) #NEWLINE# list += traceback . format_exception_only ( self . exc_type , self . exc_value ) #NEWLINE# return list