diff options
Diffstat (limited to 'lib/chef/exceptions.rb')
-rw-r--r-- | lib/chef/exceptions.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index ba34b22e61..6a90b0cc52 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -290,6 +290,26 @@ class Chef end + class Secret + class RetrievalError < RuntimeError; end + class ConfigurationInvalid < RuntimeError; end + class FetchFailed < RuntimeError; end + class MissingSecretName < RuntimeError; end + + class InvalidFetcherService < RuntimeError + def initialize(given, fetcher_service_names) + super("#{given} is not a supported secrets service. Supported services are: :#{fetcher_service_names.join(" :")}") + end + end + + class MissingFetcher < RuntimeError + def initialize(fetcher_service_names) + super("No secret service provided. Supported services are: :#{fetcher_service_names.join(" :")}") + end + end + + end + # Exception class for collecting multiple failures. Used when running # delayed notifications so that chef can process each delayed # notification even if chef client or other notifications fail. |