explain that a requirement caused the error, otherwise you search until you die

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-01-19 23:22:48 +01:00
parent f3b7fc1514
commit ce73cef457

View file

@ -194,7 +194,9 @@ class Emulator(object):
except core.cdist_type.NoSuchTypeError as e: except core.cdist_type.NoSuchTypeError as e:
self.log.error("%s requires object %s, but type %s does not exist (definded at %s)" % (self.cdist_object.name, requirement, e.name, self.object_source)) self.log.error("%s requires object %s, but type %s does not exist (definded at %s)" % (self.cdist_object.name, requirement, e.name, self.object_source))
raise raise
except core.cdist_object.MissingObjectIdError as e:
self.log.error("%s requires object %s (without object id), but type %s is not a singleton (definded at %s)" % (self.cdist_object.name, requirement, e.type_name, self.object_source))
raise
self.log.debug("Recording requirement: " + requirement) self.log.debug("Recording requirement: " + requirement)