From: tierno Date: Mon, 25 Mar 2019 15:00:02 +0000 (+0000) Subject: capturing wim exceptions properly X-Git-Tag: v6.0.0~30 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F64%2F7364%2F1;p=osm%2FRO.git capturing wim exceptions properly Change-Id: I8bb1dde991e416c30acf841d99fdaea3c788eb97 Signed-off-by: tierno --- diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index f6cb8479..281b8f96 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -3588,12 +3588,14 @@ def create_instance(mydb, tenant_id, instance_dict): returned_instance = mydb.get_instance_scenario(instance_uuid) returned_instance["action_id"] = instance_action_id return returned_instance - except (NfvoException, vimconn.vimconnException, db_base_Exception) as e: + except (NfvoException, vimconn.vimconnException, wimconn.WimConnectorError, db_base_Exception) as e: message = rollback(mydb, myvims, rollbackList) if isinstance(e, db_base_Exception): error_text = "database Exception" elif isinstance(e, vimconn.vimconnException): error_text = "VIM Exception" + elif isinstance(e, wimconn.WimConnectorError): + error_text = "WIM Exception" else: error_text = "Exception" error_text += " {} {}. {}".format(type(e).__name__, str(e), message)