From ce73cef4574dca1ad6dffa59d61c5546732df837 Mon Sep 17 00:00:00 2001
From: Nico Schottelius <nico@bento.schottelius.org>
Date: Sun, 19 Jan 2014 23:22:48 +0100
Subject: [PATCH] explain that a requirement caused the error, otherwise you
 search until you die

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
---
 cdist/emulator.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cdist/emulator.py b/cdist/emulator.py
index b70ef956..899a710f 100644
--- a/cdist/emulator.py
+++ b/cdist/emulator.py
@@ -194,7 +194,9 @@ class Emulator(object):
                 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))
                     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)