diff --git a/lib/cdist/__init__.py b/lib/cdist/__init__.py
index 973b61f8..4742a937 100644
--- a/lib/cdist/__init__.py
+++ b/lib/cdist/__init__.py
@@ -44,6 +44,18 @@ class Error(Exception):
     """Base exception class for this project"""
     pass
 
+class CdistObjectError(Error):
+    """Something went wrong with an object"""
+    
+    def __init__(self, cdist_object, message):
+        self.name = cdist_object.name
+        self.source = " ".join(cdist_object.source)
+        self.message = message
+
+
+    def __str__(self):
+        return '%s: %s (defined at %s)' % (self.name, self.message, self.source)
+
 def file_to_list(filename):
     """Return list from \n seperated file"""
     if os.path.isfile(filename):
diff --git a/lib/cdist/resolver.py b/lib/cdist/resolver.py
index 24a5e496..368c9eb8 100644
--- a/lib/cdist/resolver.py
+++ b/lib/cdist/resolver.py
@@ -125,7 +125,7 @@ class DependencyResolver(object):
             resolved.append(cdist_object)
             unresolved.remove(cdist_object)
         except RequirementNotFoundError as e:
-            raise cdist.Error(cdist_object.name + " requires non-existing " + e.requirement)
+            raise cdist.CdistObjectError(cdist_object, "requires non-existing " + e.requirement)
 
     def __iter__(self):
         """Iterate over all unique objects while resolving dependencies.