Exception: PgPipeline::QueryError

Inherits:
Error
  • Object
show all
Defined in:
lib/pg_pipeline/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, cause_result: nil) ⇒ QueryError

Returns a new instance of QueryError.



18
19
20
21
# File 'lib/pg_pipeline/errors.rb', line 18

def initialize(message, cause_result: nil)
  super(message)
  @cause_result = cause_result
end

Instance Attribute Details

#cause_resultObject (readonly)

Returns the value of attribute cause_result.



16
17
18
# File 'lib/pg_pipeline/errors.rb', line 16

def cause_result
  @cause_result
end

Instance Method Details

#clear_result!Object



23
24
25
26
# File 'lib/pg_pipeline/errors.rb', line 23

def clear_result!
  @cause_result&.clear if @cause_result.respond_to?(:clear)
  @cause_result = nil
end