Exception: Leap::NoSolutionError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/leap/no_solution_error.rb

Overview

Raised when a Leap solution cannot be found.

If this is raised unexpectedly, try removing compliance constraints or double-checking that you have enough quorums within mainline committees to provide conclusions given any combination of input data.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ NoSolutionError

Create the excpetion



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/leap/no_solution_error.rb', line 9

def initialize(options = {})
  @goal = options[:goal]
  @deliberation = options[:deliberation]
  
  if @goal
    help = "No solution was found for \"#{@goal}\"."
  else
    help = "No solution was found."
  end
  
  if @deliberation
    help << " (#{deliberation_report})"
  end
  
  super help
end