summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/interface.rb8
-rw-r--r--lib/puppet/interface/action.rb2
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/puppet/interface.rb b/lib/puppet/interface.rb
index ced00863d..ba68ac65b 100644
--- a/lib/puppet/interface.rb
+++ b/lib/puppet/interface.rb
@@ -139,12 +139,10 @@ class Puppet::Interface
action.get_option(name).__decoration_name(type)
end
+ # Exceptions here should propagate up; this implements a hook we can use
+ # reasonably for option validation.
methods.each do |hook|
- begin
- respond_to? hook and self.__send__(hook, action, passed_args, passed_options)
- rescue => e
- Puppet.warning("invoking #{action} #{type} hook: #{e}")
- end
+ respond_to? hook and self.__send__(hook, action, passed_args, passed_options)
end
end
diff --git a/lib/puppet/interface/action.rb b/lib/puppet/interface/action.rb
index 08bc0a345..464b2a738 100644
--- a/lib/puppet/interface/action.rb
+++ b/lib/puppet/interface/action.rb
@@ -239,7 +239,7 @@ WRAPPER
end.select(&:required?).collect(&:name) - args.last.keys
return if required.empty?
- raise ArgumentError, "missing required options (#{required.join(', ')})"
+ raise ArgumentError, "The following options are required: #{required.join(', ')}"
end
########################################################################