Class: EventSourcery::EventProcessing::ErrorHandlers::NoRetry

Inherits:
Object
  • Object
show all
Includes:
ErrorHandler
Defined in:
lib/event_sourcery/event_processing/error_handlers/no_retry.rb

Instance Method Summary collapse

Constructor Details

#initialize(processor_name:) ⇒ NoRetry

Returns a new instance of NoRetry.



6
7
8
# File 'lib/event_sourcery/event_processing/error_handlers/no_retry.rb', line 6

def initialize(processor_name:)
  @processor_name = processor_name
end

Instance Method Details

#with_error_handlingObject

Will yield the block and exit the process if an error is raised.



11
12
13
14
15
16
# File 'lib/event_sourcery/event_processing/error_handlers/no_retry.rb', line 11

def with_error_handling
  yield
rescue => error
  report_error(error)
  Process.exit(false)
end