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



390
391
392
393
# File 'lib/berkshelf/errors.rb', line 390

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

Instance Method Details

#to_sObject Also known as: message



395
396
397
# File 'lib/berkshelf/errors.rb', line 395

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