Exception: Berkshelf::NoSolutionError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

#initialize(demands, original_exception) ⇒ NoSolutionError

Returns a new instance of NoSolutionError.

Parameters:



79
80
81
82
# File 'lib/berkshelf/errors.rb', line 79

def initialize(demands, original_exception)
  @demands = demands
  @original_exception = original_exception
end

Instance Attribute Details

#demandsObject (readonly)

Returns the value of attribute demands.



76
77
78
# File 'lib/berkshelf/errors.rb', line 76

def demands
  @demands
end

Instance Method Details

#to_sObject Also known as: message



84
85
86
87
# File 'lib/berkshelf/errors.rb', line 84

def to_s
  @original_exception.to_s +
    "Unable to find a solution for demands: #{demands.join(", ")}"
end