lib/ridley/errors.rb in ridley-2.5.1 vs lib/ridley/errors.rb in ridley-3.0.0.rc1
- old
+ new
@@ -40,9 +40,32 @@
class EncryptedDataBagSecretNotSet < RidleyError
def message
"no encrypted data bag secret was set for this Ridley connection"
end
end
+ class FromFileParserError < RidleyError
+ def initialize(filename, error)
+ super "Could not parse `#{filename}': #{error.message}"
+
+ # Populate the backtrace with the actual error though
+ set_backtrace(error.backtrace)
+ end
+ end
+
+ class MissingNameAttribute < RidleyError
+ def initialize(path)
+ @path = path
+ end
+
+ def to_s
+ out = "The metadata at '#{@path}' does not contain a 'name' "
+ out << "attribute. While Chef does not strictly enforce this "
+ out << "requirement, Ridley cannot continue without a valid metadata "
+ out << "'name' entry."
+ out
+ end
+ alias_method :message, :to_s
+ end
class BootstrapError < RidleyError; end
class ClientKeyFileNotFoundOrInvalid < BootstrapError; end
class EncryptedDataBagSecretNotFound < BootstrapError; end