summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-03-29 11:56:43 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-02 15:51:23 -0700
commita3f5f974251e14f02e8f83e12f4589581dd21828 (patch)
tree4de50d241c52b39740407d11aac0c6d7da50cff7 /lib/puppet
parent6554fd3b895c704e8e025c5bb9d71863fff4c338 (diff)
downloadpuppet-a3f5f974251e14f02e8f83e12f4589581dd21828.tar.gz
puppet-a3f5f974251e14f02e8f83e12f4589581dd21828.tar.xz
puppet-a3f5f974251e14f02e8f83e12f4589581dd21828.zip
MAINT: fix error reporting when you set terminus incorrectly.
Previously we tried to invoke a class method on an instance, and threw another exception, which wasn't the most helpful behaviour. This fixes that to correctly report the array of available terminus classes to the user. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/string/indirector.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/string/indirector.rb b/lib/puppet/string/indirector.rb
index 15984e39e..48ec32680 100644
--- a/lib/puppet/string/indirector.rb
+++ b/lib/puppet/string/indirector.rb
@@ -62,7 +62,7 @@ class Puppet::String::Indirector < Puppet::String
begin
indirection.terminus_class = from
rescue => detail
- raise "Could not set '#{indirection.name}' terminus to '#{from}' (#{detail}); valid terminus types are #{terminus_classes(indirection.name).join(", ") }"
+ raise "Could not set '#{indirection.name}' terminus to '#{from}' (#{detail}); valid terminus types are #{self.class.terminus_classes(indirection.name).join(", ") }"
end
end