lib/chef-cli/exceptions.rb in chef-cli-5.2.0 vs lib/chef-cli/exceptions.rb in chef-cli-5.3.0
- old
+ new
@@ -1,7 +1,7 @@
#
-# Copyright:: Copyright (c) 2014-2019 Chef Software Inc.
+# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -67,9 +67,21 @@
super(msg)
end
end
class MissingCookbookLockData < StandardError
+ end
+
+ class PolicyfileMissingCookbookMetadata < StandardError
+ def initialize(cookbook_root)
+ super("Policyfile specified to use cookbook metadata, but neither #{cookbook_root}/metadata.rb or #{cookbook_root}/metadata.json was found.")
+ end
+ end
+
+ class PolicyfileBadCookbookMetadata < StandardError
+ def initialize(cookbook_root, e)
+ super("Cookbook metadata for cookbook at #{cookbook_root} could not be parsed:\n Original Exception: #{e}")
+ end
end
class InvalidLockfile < StandardError
end