summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-18 11:09:46 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-18 14:55:15 -0800
commite8254856a5c9fa532886148cbe2b0f8d87179f01 (patch)
tree0b1f407b0cc5d4a71a082cd0a85ed02dc672c19d /lib/puppet
parentcf18353472ce9c4e51157d21882a7f129853fd10 (diff)
downloadpuppet-e8254856a5c9fa532886148cbe2b0f8d87179f01.tar.gz
puppet-e8254856a5c9fa532886148cbe2b0f8d87179f01.tar.xz
puppet-e8254856a5c9fa532886148cbe2b0f8d87179f01.zip
Maint: Added assertion to make sure Log.close_all succeeds
If the hash containing log destinations gets corrupted, Log.close_all could fail silently. This change adds an exception to make these failures easier to debug should they ever happen again.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/util/log.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/util/log.rb b/lib/puppet/util/log.rb
index 36a765c61..a5aacc265 100644
--- a/lib/puppet/util/log.rb
+++ b/lib/puppet/util/log.rb
@@ -57,6 +57,7 @@ class Puppet::Util::Log
destinations.keys.each { |dest|
close(dest)
}
+ raise Puppet::DevError.new("Log.close_all failed to close #{@destinations.keys.inspect}") if !@destinations.empty?
end
# Flush any log destinations that support such operations.