Class: Sneaql::Exceptions::ExceptionManager

Inherits:
Object
  • Object
show all
Defined in:
lib/sneaql_lib/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger = nil) ⇒ ExceptionManager

Returns a new instance of ExceptionManager.



8
9
10
# File 'lib/sneaql_lib/exceptions.rb', line 8

def initialize(logger = nil)
  @logger = logger ? logger : Logger.new(STDOUT)
end

Instance Attribute Details

#last_iterated_recordObject

Returns the value of attribute last_iterated_record.



6
7
8
# File 'lib/sneaql_lib/exceptions.rb', line 6

def last_iterated_record
  @last_iterated_record
end

#pending_errorObject

Returns the value of attribute pending_error.



5
6
7
# File 'lib/sneaql_lib/exceptions.rb', line 5

def pending_error
  @pending_error
end

Instance Method Details

#output_pending_errorObject



12
13
14
# File 'lib/sneaql_lib/exceptions.rb', line 12

def output_pending_error
  @logger.error "pending error: #{@pending_error}" if @pending_error
end