Exception: Chef::Exceptions::CookbookOhaiVersionMismatch
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Chef::Exceptions::CookbookOhaiVersionMismatch
- Defined in:
- lib/chef/exceptions.rb
Instance Method Summary collapse
-
#initialize(ohai_version, cookbook_name, cookbook_version, *constraints) ⇒ CookbookOhaiVersionMismatch
constructor
A new instance of CookbookOhaiVersionMismatch.
Constructor Details
#initialize(ohai_version, cookbook_name, cookbook_version, *constraints) ⇒ CookbookOhaiVersionMismatch
Returns a new instance of CookbookOhaiVersionMismatch.
522 523 524 525 |
# File 'lib/chef/exceptions.rb', line 522 def initialize(ohai_version, cookbook_name, cookbook_version, *constraints) constraint_str = constraints.map { |c| c.requirement.as_list.to_s }.join(", ") super "Cookbook '#{cookbook_name}' version '#{cookbook_version}' depends on ohai version #{constraint_str}, but the running ohai version is #{ohai_version}" end |