summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/pgraph.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/puppet/pgraph.rb b/lib/puppet/pgraph.rb
index 80a272cdf..ce6c1e411 100644
--- a/lib/puppet/pgraph.rb
+++ b/lib/puppet/pgraph.rb
@@ -57,9 +57,15 @@ class Puppet::PGraph < GRATR::Digraph
bad << v unless sorted.include?(v)
end
- raise Puppet::Error, "Found dependency cycle involving %s" % bad.collect do |v|
- v.to_s
- end.join(", ")
+ if bad.length > 0
+ raise Puppet::Error,
+ "Found dependency cycle involving %s" % bad.collect do |v|
+ v.to_s
+ end.join(", ")
+ else
+ raise Puppet::Error,
+ "Found dependency cycle but could not find the cause"
+ end
end
# Which resources a given resource depends upon.