#NEWLINE# @ staticmethod #NEWLINE# def _handle_create_exception( * exc_info ) : #NEWLINE# #INDENT# 'The `CREATE_EXCEPTIONS` dict containing the relationships between\n        the nova exceptions and the webob exception classes to be raised is\n        defined at the top of this file.\n        ' #NEWLINE# error = exc_info [ 1 ] #NEWLINE# err_cls = error . __class__ #NEWLINE# cls_to_raise = CREATE_EXCEPTIONS . get ( err_cls ) #NEWLINE# if ( cls_to_raise is None ) : #NEWLINE# #INDENT# to_raise = [ val for ( key , val ) in CREATE_EXCEPTIONS . items ( ) if isinstance ( error , key ) ] #NEWLINE# if ( len ( to_raise ) > 1 ) : #NEWLINE# #INDENT# cls_to_raise = Controller . _resolve_exception ( to_raise ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not to_raise ) : #NEWLINE# #INDENT# six . reraise ( * exc_info ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cls_to_raise = to_raise [ 0 ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for ( key , val ) in CREATE_EXCEPTIONS_MSGS . items ( ) : #NEWLINE# #INDENT# if isinstance ( error , key ) : #NEWLINE# #INDENT# raise cls_to_raise ( explanation = CREATE_EXCEPTIONS_MSGS [ key ] ) #NEWLINE# #UNINDENT# #UNINDENT# raise cls_to_raise ( explanation = error . format_message ( ) )