diff options
| author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-10-24 10:45:43 -0700 |
|---|---|---|
| committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-10-24 10:45:43 -0700 |
| commit | 97aaf5bbcdfd0810722b123bdc67e883a7ca8077 (patch) | |
| tree | 25663bf1d4f53664b96844251091b51273ad84c7 /lib/chef/exceptions.rb | |
| parent | cb1bcb1f08816f551f96e713624718f58da3c9b3 (diff) | |
| download | chef-97aaf5bbcdfd0810722b123bdc67e883a7ca8077.tar.gz | |
Chef-12 RC Provider Resolver
makes resource and provider class resolution more dynamic.
begins deprecation of Chef::Platform static mapping.
Diffstat (limited to 'lib/chef/exceptions.rb')
| -rw-r--r-- | lib/chef/exceptions.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index 67429ac5a2..25f08455fc 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -91,7 +91,11 @@ class Chef class ResourceNotFound < RuntimeError; end # Can't find a Resource of this type that is valid on this platform. - class NoSuchResourceType < NameError; end + class NoSuchResourceType < NameError + def initialize(short_name, node) + super "Cannot find a resource for #{short_name} on #{node[:platform]} version #{node[:platform_version]}" + end + end class InvalidResourceSpecification < ArgumentError; end class SolrConnectionError < RuntimeError; end @@ -355,5 +359,12 @@ class Chef end class InvalidSearchQuery < ArgumentError; end + + # Raised by Chef::ProviderResolver + class AmbiguousProviderResolution < RuntimeError + def initialize(resource, classes) + super "Found more than one provider for #{resource.resource_name} resource: #{classes}" + end + end end end |
