summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/settings.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-07-04 17:33:12 -0500
committerLuke Kanies <luke@madstop.com>2008-07-04 17:33:12 -0500
commit196494a63eafc495224c1bfea933740fad7d76f0 (patch)
tree0c4a949c90de11ab0d45c7e1218e6ee9b73b0da0 /lib/puppet/util/settings.rb
parent7a6ae299621a16fa7fd8ab0fbd2c05fe723cffa4 (diff)
downloadpuppet-196494a63eafc495224c1bfea933740fad7d76f0.tar.gz
puppet-196494a63eafc495224c1bfea933740fad7d76f0.tar.xz
puppet-196494a63eafc495224c1bfea933740fad7d76f0.zip
Fixed #1231 - Exceptions during startup should now be clear.
This will often result in duplicate information, but at least the information will now always be there. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/util/settings.rb')
-rw-r--r--lib/puppet/util/settings.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
index d8197f743..f20dee401 100644
--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -731,8 +731,10 @@ Generated on #{Time.now}.
begin
catalog.host_config = false
catalog.apply do |transaction|
- if failures = transaction.any_failed?
- raise "Could not configure for running; got %s failure(s)" % failures
+ if transaction.any_failed?
+ report = transaction.report
+ failures = report.logs.find_all { |log| log.level == :err }
+ raise "Got %s failure(s) while initializing: %s" % [failures.length, failures.collect { |l| l.to_s }.join("; ")]
end
end
ensure