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:



72
73
74
75
# File 'lib/berkshelf/errors.rb', line 72

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

Instance Attribute Details

#demandsObject (readonly)

Returns the value of attribute demands.



69
70
71
# File 'lib/berkshelf/errors.rb', line 69

def demands
  @demands
end

Instance Method Details

#to_sObject



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

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