Exception: Berkshelf::ConfigNotFound

Inherits:
BerkshelfError show all
Defined in:
lib/berkshelf/errors.rb

Overview

Raised when a cookbook or its recipes contain a space or invalid character in the path.

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

#initialize(type, path) ⇒ ConfigNotFound

Returns a new instance of ConfigNotFound.

Parameters:

  • type (String)

    the type of config that was not found (Berkshelf, Chef, etc)

  • path (#to_s)

    the path to the specified Chef config that did not exist


354
355
356
357
# File 'lib/berkshelf/errors.rb', line 354

def initialize(type, path)
  @type = type.to_s
  @path = path
end

Instance Method Details

#to_sObject


359
360
361
# File 'lib/berkshelf/errors.rb', line 359

def to_s
  "No #{@type.capitalize} config file found at: '#{@path}'!"
end