#NEWLINE# def create_exception( self , code , message , stacks = None ) : #NEWLINE# #INDENT# ' build IonException from code, message, and optionally one or more stack traces ' #NEWLINE# if ( str ( code ) in self . _exception_map ) : #NEWLINE# #INDENT# out = self . _exception_map [ str ( code ) ] ( message ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# out = self . _default ( message ) #NEWLINE# #UNINDENT# return self