#NEWLINE# def _wrap_error( exc , mapping , key ) : #NEWLINE# #INDENT# if ( key not in mapping ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# new_err_cls = mapping [ key ] #NEWLINE# new_err = new_err_cls ( * exc . args ) #NEWLINE# if hasattr ( exc , '__traceback__' ) : #NEWLINE# #INDENT# traceback = exc . __traceback__ #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# traceback = sys . exc_info ( ) [ 2 ] #NEWLINE# #UNINDENT# six . reraise ( new_err_cls , new_err , traceback )