#NEWLINE# def format_collected_data( self , exc_data ) : #NEWLINE# #INDENT# general_data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if self . show_extra_data : #NEWLINE# #INDENT# for ( name , value_list ) in exc_data . extra_data . items ( ) : #NEWLINE# #INDENT# if isinstance ( name , tuple ) : #NEWLINE# #INDENT# ( importance , title ) = name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( importance , title ) = ( 'normal' , name ) #NEWLINE# #UNINDENT# for value in value_list : #NEWLINE# #INDENT# general_data [ ( importance , name ) ] = self . format_extra_data ( importance , title , value ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# lines = [ ] #NEWLINE# frames = self . filter_frames ( exc_data . frames ) #NEWLINE# for frame in frames : #NEWLINE# #INDENT# sup = frame . supplement #NEWLINE# if sup : #NEWLINE# #INDENT# if sup . object : #NEWLINE# #INDENT# general_data [ ( 'important' , 'object' ) ] = self . format_sup_object ( sup . object ) #NEWLINE# #UNINDENT# if sup . source_url : #NEWLINE# #INDENT# general_data [ ( 'important' , 'source_url' ) ] = self . format_sup_url ( sup . source_url ) #NEWLINE# #UNINDENT# if sup . line : #NEWLINE# #INDENT# lines . append ( self . format_sup_line_pos ( sup . line , sup . column ) ) #NEWLINE# #UNINDENT# if sup . expression : #NEWLINE# #INDENT# lines . append ( self . format_sup_expression ( sup . expression ) ) #NEWLINE# #UNINDENT# if sup . warnings : #NEWLINE# #INDENT# for warning in sup . warnings : #NEWLINE# #INDENT# lines . append ( self . format_sup_warning ( warning ) ) #NEWLINE# #UNINDENT# #UNINDENT# if sup . info : #NEWLINE# #INDENT# lines . extend ( self . format_sup_info ( sup . info ) ) #NEWLINE# #UNINDENT# #UNINDENT# if frame . supplement_exception : #NEWLINE# #INDENT# lines . append ( 'Exception in supplement:' ) #NEWLINE# lines . append ( self . quote_long ( frame . supplement_exception ) ) #NEWLINE# #UNINDENT# if frame . traceback_info : #NEWLINE# #INDENT# lines . append ( self . format_traceback_info ( frame . traceback_info ) ) #NEWLINE# #UNINDENT# filename = frame . filename #NEWLINE# if ( filename and self . trim_source_paths ) : #NEWLINE# #INDENT# for ( path , repl ) in self . trim_source_paths : #NEWLINE# #INDENT# if filename . startswith ( path ) : #NEWLINE# #INDENT# filename = ( repl + filename [ len ( path ) : ] ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# lines . append ( self . format_source_line ( ( filename or '?' ) , frame ) ) #NEWLINE# source = frame . get_source_line ( ) #NEWLINE# long_source = frame . get_source_line ( 2 ) #NEWLINE# if source : #NEWLINE# #INDENT# lines . append ( self . format_long_source ( source , long_source ) ) #NEWLINE# #UNINDENT# #UNINDENT# etype = exc_data . exception_type #NEWLINE# if ( not isinstance ( etype , six . string_types ) ) : #NEWLINE# #INDENT# etype = etype . __name__ #NEWLINE# #UNINDENT# exc_info = self . format_exception_info ( etype , exc_data . exception_value ) #NEWLINE# data_by_importance = { #NEWLINE# #INDENT# 'important' : [ ] , #NEWLINE# 'normal' : [ ] , #NEWLINE# 'supplemental' : [ ] , #NEWLINE# 'extra' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# for ( ( importance , name ) , value ) in general_data . items ( ) : #NEWLINE# #INDENT# data_by_importance [ importance ] . append ( ( name , value ) ) #NEWLINE# #UNINDENT# for value in data_by_importance . values ( ) : #NEWLINE# #INDENT# value . sort ( ) #NEWLINE# #UNINDENT# return self . format_combine ( data_by_importance , lines , exc_info )