Exception: Analytica::Computation::InvalidInputException

Inherits:
Exception
  • Object
show all
Defined in:
lib/computation.rb

Instance Method Summary collapse

Constructor Details

#initialize(comp, size, params, constraints) ⇒ InvalidInputException

Returns a new instance of InvalidInputException.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/computation.rb', line 8

def initialize(comp, size, params, constraints)
  enforce!([:average_filter,
            :moving_average], comp)
  enforce_primitive!(Hash, params)
  enforce!(:string_array, constraints)

  @msg = "Unable to calculate #{comp.inspect} on DataSet size #{size} with input #{params.inspect}"
  @msg += "\nConstraints:\n"
  constraints.each do |c|
    @msg += c+"\n"
  end
end

Instance Method Details

#inspectObject



21
22
23
# File 'lib/computation.rb', line 21

def inspect
  @msg
end