[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
Markus Roberts
Markus at reality.com
Wed Jul 14 10:36:01 UTC 2010
The following commit has been merged in the upstream branch:
commit 697508d65588526a230c5d51daca34ad9f9a1f2b
Author: Nick Lewis <nick at puppetlabs.com>
Date: Wed Jun 30 14:53:26 2010 -0700
[#4108] Missing constants fail deliberately and with a message
Previously, any failed call to Puppet::Application.find would result
in an error being raised by const_get, resulting in a messy crash with
a stack trace. Now that error is handled, and the application will
print a message and exit.
diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb
index 8aa3708..ac2cc10 100644
--- a/lib/puppet/application.rb
+++ b/lib/puppet/application.rb
@@ -214,7 +214,12 @@ class Application
end
def find(name)
- self.const_get(name.to_s.capitalize)
+ begin
+ self.const_get(name.to_s.capitalize)
+ rescue
+ puts "Const '#{name.to_s.capitalize}' appears to be undefined. Unable to continue without it."
+ Kernel::exit(1)
+ end
end
def [](name)
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list