Merge "Fix reraising of exceptions"
This commit is contained in:
commit
ba82e8b68e
@ -131,11 +131,8 @@ class BaseAction(loadable.Loadable):
|
||||
raise NotImplementedError()
|
||||
|
||||
def validate_parameters(self):
|
||||
try:
|
||||
jsonschema.validate(self.input_parameters, self.schema)
|
||||
return True
|
||||
except jsonschema.ValidationError as e:
|
||||
raise e
|
||||
jsonschema.validate(self.input_parameters, self.schema)
|
||||
return True
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_description(self):
|
||||
|
@ -109,11 +109,8 @@ class VolumeMigrate(base.BaseAction):
|
||||
}
|
||||
|
||||
def validate_parameters(self):
|
||||
try:
|
||||
jsonschema.validate(self.input_parameters, self.schema)
|
||||
return True
|
||||
except jsonschema.ValidationError as e:
|
||||
raise e
|
||||
jsonschema.validate(self.input_parameters, self.schema)
|
||||
return True
|
||||
|
||||
@property
|
||||
def volume_id(self):
|
||||
|
@ -59,7 +59,7 @@ class IndicatorSpecification(object):
|
||||
jsonschema.validate(value, cls.schema)
|
||||
except (SchemaError, ValidationError) as exc:
|
||||
LOG.exception(exc)
|
||||
raise exc
|
||||
raise
|
||||
except Exception as exc:
|
||||
LOG.exception(exc)
|
||||
raise exception.InvalidIndicatorValue(
|
||||
|
Loading…
Reference in New Issue
Block a user