diff options
author | Daniel Pittman <daniel@puppetlabs.com> | 2011-03-29 11:56:43 -0700 |
---|---|---|
committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-02 15:51:23 -0700 |
commit | a3f5f974251e14f02e8f83e12f4589581dd21828 (patch) | |
tree | 4de50d241c52b39740407d11aac0c6d7da50cff7 /lib/puppet | |
parent | 6554fd3b895c704e8e025c5bb9d71863fff4c338 (diff) | |
download | puppet-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.rb | 2 |
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 |