Keep Trace Back in Exception
While catching exception, we should use 'raise' directly if we parsing same exception to upper level. In this way, we will not losing trace back information. Change-Id: I9cb208bb355082907b789dffa8de28dd33c9f01d
This commit is contained in:
parent
5b2bcd8b2e
commit
74d3131415
|
@ -62,7 +62,7 @@ class BarbicanClientPlugin(client_plugin.ClientPlugin):
|
|||
raise exception.EntityNotFound(
|
||||
entity="Secret",
|
||||
name=secret_ref)
|
||||
raise ex
|
||||
raise
|
||||
|
||||
def get_container_by_ref(self, container_ref):
|
||||
try:
|
||||
|
@ -73,7 +73,7 @@ class BarbicanClientPlugin(client_plugin.ClientPlugin):
|
|||
raise exception.EntityNotFound(
|
||||
entity="Container",
|
||||
name=container_ref)
|
||||
raise ex
|
||||
raise
|
||||
|
||||
|
||||
class SecretConstraint(constraints.BaseCustomConstraint):
|
||||
|
|
|
@ -59,7 +59,7 @@ class MistralClientPlugin(client_plugin.ClientPlugin):
|
|||
raise exception.EntityNotFound(
|
||||
entity="Workflow",
|
||||
name=workflow_identifier)
|
||||
raise ex
|
||||
raise
|
||||
|
||||
|
||||
class WorkflowConstraint(constraints.BaseCustomConstraint):
|
||||
|
|
|
@ -1734,7 +1734,7 @@ class Resource(object):
|
|||
if self.client_plugin().is_not_found(ex):
|
||||
raise exception.EntityNotFound(
|
||||
entity='Resource', name=self.name)
|
||||
raise ex
|
||||
raise
|
||||
return resource_data
|
||||
|
||||
def parse_live_resource_data(self, resource_properties, resource_data):
|
||||
|
|
|
@ -107,7 +107,7 @@ class Policy(resource.Resource):
|
|||
self.client_plugin().is_not_found(ex)):
|
||||
bd['finished'] = True
|
||||
else:
|
||||
raise ex
|
||||
raise
|
||||
|
||||
def add_bindings(self, bindings):
|
||||
for bd in bindings:
|
||||
|
|
|
@ -500,7 +500,7 @@ class OSDBInstance(resource.Resource):
|
|||
LOG.warning(_LW("Unexpected instance state change "
|
||||
"during update. Retrying."))
|
||||
return False
|
||||
raise exc
|
||||
raise
|
||||
return True
|
||||
|
||||
def _update_name(self, instance, name):
|
||||
|
|
|
@ -762,7 +762,7 @@ class Stack(collections.Mapping):
|
|||
if ignorable_errors and ex.error_code in ignorable_errors:
|
||||
result = None
|
||||
else:
|
||||
raise ex
|
||||
raise
|
||||
except AssertionError:
|
||||
raise
|
||||
except Exception as ex:
|
||||
|
|
Loading…
Reference in New Issue