diff options
author | Nolan Davidson <nolan.davidson@gmail.com> | 2014-09-11 15:45:51 -0400 |
---|---|---|
committer | Nolan Davidson <nolan.davidson@gmail.com> | 2014-09-11 15:45:51 -0400 |
commit | ce28709b5d47539258d824d7514efc4269da7a2a (patch) | |
tree | 3a693b7f7ddf8135ac6f39a220e3e13be8ad7790 /lib | |
parent | 96b3a203c064373f7b71598da3e75c1c71fa3b18 (diff) | |
download | chef-ce28709b5d47539258d824d7514efc4269da7a2a.tar.gz |
Changed exception to ResourceNotFound and printed the passed block name
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/dsl/recipe.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/dsl/recipe.rb b/lib/chef/dsl/recipe.rb index e0109f0bc2..476d9db666 100644 --- a/lib/chef/dsl/recipe.rb +++ b/lib/chef/dsl/recipe.rb @@ -19,6 +19,7 @@ require 'chef/resource_platform_map' require 'chef/mixin/convert_to_class_name' +require 'chef/exceptions' class Chef module DSL @@ -163,7 +164,7 @@ class Chef end def exec(args) - raise Chef::Exceptions::NoSuchResourceType.new "exec was called, but you probably meant to use an execute resource. If not, please call Kernel#exec explicitly" + raise Chef::Exceptions::ResourceNotFound, "exec was called, but you probably meant to use an execute resource. If not, please call Kernel#exec explicitly. The exec block called was \"#{args}\"" end end |