def exception_str(self, ex):
 return ('in %s\n:: %s' % (ex.file, ', '.join(ex.args)))

def exception_str ( self , ex ) : return ( 'in %s\n:: %s' % ( ex . file , ', ' . join ( ex . args ) ) )
function used to replace default __str__ method of exception instances .