Sha256: d21888f293c18efbc37818a39d3690d0a12135861c6237692ebb62c26fd2f524

Contents?: true

Size: 510 Bytes

Versions: 12

Compression:

Stored size: 510 Bytes

Contents

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

        # Will yield the block and exit the process if an error is raised.
        def with_error_handling
          yield
        rescue => error
          report_error(error)
          Process.exit(false)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
event_sourcery-1.0.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.24.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.23.1 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.23.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.22.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.21.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.20.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.19.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.18.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.17.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.16.1 lib/event_sourcery/event_processing/error_handlers/no_retry.rb
event_sourcery-0.15.0 lib/event_sourcery/event_processing/error_handlers/no_retry.rb