diff options
| author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-04-26 16:34:25 -0700 |
|---|---|---|
| committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-04-26 16:47:38 -0700 |
| commit | c627fad08c4866fbef300e887750c29963985635 (patch) | |
| tree | 4f0d014d232a2eec850b704c177b31f4b879e95e /lib/puppet/interface | |
| parent | cd035426848154e8d11db5c59657d1b74258c9a0 (diff) | |
| download | puppet-c627fad08c4866fbef300e887750c29963985635.tar.gz puppet-c627fad08c4866fbef300e887750c29963985635.tar.xz puppet-c627fad08c4866fbef300e887750c29963985635.zip | |
(#7251) Let exceptions raised in decorators rise.
This allows users to write before_action advice that does basic
option validation very easily.
Reviewed-By: Daniel Pittman
Diffstat (limited to 'lib/puppet/interface')
| -rw-r--r-- | lib/puppet/interface/action.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 ######################################################################## |
