[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
test branch
puppet-dev at googlegroups.com
Wed Jul 14 10:34:55 UTC 2010
The following commit has been merged in the upstream branch:
commit 7952af5b80331f60d9f3703e63285fc7fb733a8c
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Fri May 21 15:19:49 2010 -0700
[#3674] Autoloader should propagate failures
Change Autoloader's loadall to re-raise exceptions that happen when
trying to load files, rather than just warning.
Signed-off-by: Jesse Wolfe <jes5199 at gmail.com>
diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index 4a687bf..006554d 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -123,7 +123,7 @@ class Puppet::Util::Autoload
raise
rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
- warn "Could not autoload #{file}: #{detail}"
+ raise Puppet::Error, "Could not autoload #{file}: #{detail}"
end
end
end
diff --git a/spec/unit/util/autoload.rb b/spec/unit/util/autoload.rb
index 5862073..1b88662 100755
--- a/spec/unit/util/autoload.rb
+++ b/spec/unit/util/autoload.rb
@@ -113,10 +113,10 @@ describe Puppet::Util::Autoload do
end
[RuntimeError, LoadError, SyntaxError].each do |error|
- it "should not die an if a #{error.to_s} exception is thrown" do
+ it "should die an if a #{error.to_s} exception is thrown" do
Kernel.expects(:require).raises error
- lambda { @autoload.loadall }.should_not raise_error
+ lambda { @autoload.loadall }.should raise_error(Puppet::Error)
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list