Sha256: 160b7c127a9caa8eb6be4b14b6bcd0ec197be203b24764630d3861b393e8f01c

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

module EventSourcery
  module EventProcessing
    module ErrorHandlers
      class NoRetry
        include EventSourcery::EventProcessing::ErrorHandlers::ErrorHandler
        def initialize(processor_name:)
          @processor_name = processor_name
        end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
event_sourcery-0.14.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.13.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb