Add entity and name attribute to EntityNotFound
Since we use EntityNotFound for a bunch of not found cases. We should have entity and name as attribute for cases that we need to make sure the correctness when exception happens. Change-Id: I782c372723f188bab38656e5b7cc401d23808ffb
This commit is contained in:
parent
b445f42ff0
commit
0bd2ecd555
|
@ -130,6 +130,12 @@ class InvalidTemplateReference(HeatException):
|
|||
class EntityNotFound(HeatException):
|
||||
msg_fmt = _("The %(entity)s (%(name)s) could not be found.")
|
||||
|
||||
def __init__(self, entity=None, name=None, **kwargs):
|
||||
self.entity = entity
|
||||
self.name = name
|
||||
super(EntityNotFound, self).__init__(entity=entity, name=name,
|
||||
**kwargs)
|
||||
|
||||
|
||||
class PhysicalResourceNameAmbiguity(HeatException):
|
||||
msg_fmt = _(
|
||||
|
|
Loading…
Reference in New Issue