Exception: Berkshelf::LockfileParserError

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

Instance Method Summary collapse

Methods inherited from BerkshelfError

status_code

Constructor Details

#initialize(lockfile, original) ⇒ LockfileParserError

Returns a new instance of LockfileParserError.

Parameters:

  • lockfile (String)

    the path to the Lockfile

  • original (~Exception)

    the original exception class



403
404
405
406
# File 'lib/berkshelf/errors.rb', line 403

def initialize(lockfile, original)
  @lockfile = Pathname.new(lockfile.to_s).basename.to_s
  @original = original
end

Instance Method Details

#to_sObject



408
409
410
# File 'lib/berkshelf/errors.rb', line 408

def to_s
  "Error reading the Berkshelf lockfile `#{@lockfile}` (#{@original.class})"
end