summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/resource.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 4f0d50750..6821e0e06 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -201,8 +201,13 @@ class Puppet::Resource
tag(self.title) if valid_tag?(self.title)
@reference = Reference.new(@type,@title) # for serialization compatibility with 0.25.x
-
- raise ArgumentError, "Invalid resource type #{type}" if strict? and ! resource_type
+ if strict? and ! resource_type
+ if @type == 'Class'
+ raise ArgumentError, "Could not find declared class #{title}"
+ else
+ raise ArgumentError, "Invalid resource type #{type}"
+ end
+ end
end
def ref