Exception: Statsample::DatasetException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/statsample/dataset.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ds, e) ⇒ DatasetException

Returns a new instance of DatasetException.



22
23
24
25
# File 'lib/statsample/dataset.rb', line 22

def initialize(ds,e)
  @ds=ds
  @exp=e
end

Instance Attribute Details

#dsObject (readonly)

Returns the value of attribute ds.



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

def ds
  @ds
end

#expObject (readonly)

Returns the value of attribute exp.



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

def exp
  @exp
end

Instance Method Details

#to_sObject



26
27
28
29
30
# File 'lib/statsample/dataset.rb', line 26

def to_s
  m="Error on iteration: "+@exp.message+"\n"+@exp.backtrace.join("\n")
  m+="\nRow ##{@ds.i}:#{@ds.case_as_hash(@ds.i)}" unless @ds.i.nil?
  m
end