Exception: GroongaDelta::GenerationError

Inherits:
Error
  • Object
show all
Defined in:
lib/groonga-delta/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_record, groonga_column, detail) ⇒ GenerationError

Returns a new instance of GenerationError.



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/groonga-delta/error.rb', line 35

def initialize(source_record, groonga_column, detail)
  @source_record = source_record
  @groonga_column = groonga_column
  @detail = detail
  message =
    "failed to generate a Groonga record:\n" +
    "source record: #{PP.pp(source_record, '')}" +
    "Groonga column: #{PP.pp(groonga_column, '')}" +
    "detail: #{@detail.message}(#{@detail.class})\n" +
    @detail.backtrace.join("\n")
  super(message)
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



34
35
36
# File 'lib/groonga-delta/error.rb', line 34

def detail
  @detail
end

#groonga_columnObject (readonly)

Returns the value of attribute groonga_column.



33
34
35
# File 'lib/groonga-delta/error.rb', line 33

def groonga_column
  @groonga_column
end

#source_recordObject (readonly)

Returns the value of attribute source_record.



32
33
34
# File 'lib/groonga-delta/error.rb', line 32

def source_record
  @source_record
end