[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1456-g2f0b1e5
James Turnbull
james at lovedthanlost.net
Tue Oct 27 17:05:38 UTC 2009
The following commit has been merged in the upstream branch:
commit 5f2558939bbf4ce180aa5d7c0d534e974bd01a4f
Author: Markus Roberts <Markus at reality.com>
Date: Thu Sep 17 19:49:18 2009 -0700
Ticket #2626 (unhelpfull error messages)
Reworks the error message to 1) make it clearer that it's an internal
error, not something the user did, 2) rearrange the sentence to make
it clearer that "setting" is being used as a noun 3) combined several
fields to increase the chance that the identifying information would
suffice to lead someone to the actual source of the error.
Signed-off-by: Markus Roberts <Markus at reality.com>
diff --git a/lib/puppet/util/settings/file_setting.rb b/lib/puppet/util/settings/file_setting.rb
index 22e408a..573628f 100644
--- a/lib/puppet/util/settings/file_setting.rb
+++ b/lib/puppet/util/settings/file_setting.rb
@@ -16,7 +16,8 @@ class Puppet::Util::Settings::FileSetting < Puppet::Util::Settings::Setting
def group=(value)
unless AllowedGroups.include?(value)
- raise SettingError, "Invalid group %s on setting %s. Valid groups are %s." % [value, name, AllowedGroups.join(', ')]
+ identifying_fields = [desc,name,default].compact.join(': ')
+ raise SettingError, "Internal error: The :group setting for %s must be 'service', not '%s'" % [identifying_fields,value]
end
@group = value
end
@@ -28,7 +29,8 @@ class Puppet::Util::Settings::FileSetting < Puppet::Util::Settings::Setting
def owner=(value)
unless AllowedOwners.include?(value)
- raise SettingError, "Invalid owner %s on setting %s. Valid owners are %s." % [value, name, AllowedOwners.join(', ')]
+ identifying_fields = [desc,name,default].compact.join(': ')
+ raise SettingError, "Internal error: The :owner setting for %s must be either 'root' or 'service', not '%s'" % [identifying_fields,value]
end
@owner = value
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list