Exception: Solve::Errors::UnsortableSolutionError
- Inherits:
-
SolveError
- Object
- StandardError
- SolveError
- Solve::Errors::UnsortableSolutionError
- Defined in:
- lib/solve/errors.rb
Instance Attribute Summary collapse
-
#internal_exception ⇒ Object
readonly
Returns the value of attribute internal_exception.
-
#unsorted_solution ⇒ Object
readonly
Returns the value of attribute unsorted_solution.
Instance Method Summary collapse
-
#initialize(internal_exception, unsorted_solution) ⇒ UnsortableSolutionError
constructor
A new instance of UnsortableSolutionError.
- #to_s ⇒ Object
Constructor Details
#initialize(internal_exception, unsorted_solution) ⇒ UnsortableSolutionError
Returns a new instance of UnsortableSolutionError.
72 73 74 75 |
# File 'lib/solve/errors.rb', line 72 def initialize(internal_exception, unsorted_solution) @internal_exception = internal_exception @unsorted_solution = unsorted_solution end |
Instance Attribute Details
#internal_exception ⇒ Object (readonly)
Returns the value of attribute internal_exception.
69 70 71 |
# File 'lib/solve/errors.rb', line 69 def internal_exception @internal_exception end |
#unsorted_solution ⇒ Object (readonly)
Returns the value of attribute unsorted_solution.
70 71 72 |
# File 'lib/solve/errors.rb', line 70 def unsorted_solution @unsorted_solution end |
Instance Method Details
#to_s ⇒ Object
77 78 79 |
# File 'lib/solve/errors.rb', line 77 def to_s "The solution contains a cycle and cannot be topologically sorted. See #unsorted_solution on this exception for the unsorted solution" end |