diff options
Diffstat (limited to 'lib/puppet/application.rb')
-rw-r--r-- | lib/puppet/application.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb index 1a9939b76..a32650a8f 100644 --- a/lib/puppet/application.rb +++ b/lib/puppet/application.rb @@ -212,12 +212,10 @@ class Application end def find(name) - begin self.const_get(name.to_s.capitalize) - rescue + rescue puts "Unable to find application '#{name.to_s}'." Kernel::exit(1) - end end def [](name) @@ -397,13 +395,11 @@ class Application private def exit_on_fail(message, code = 1) - begin yield - rescue RuntimeError, NotImplementedError => detail + rescue RuntimeError, NotImplementedError => detail puts detail.backtrace if Puppet[:trace] $stderr.puts "Could not #{message}: #{detail}" exit(code) - end end end end |