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



392
393
394
395
# File 'lib/berkshelf/errors.rb', line 392

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

Instance Method Details

#to_sObject Also known as: message



397
398
399
# File 'lib/berkshelf/errors.rb', line 397

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