Sha256: 894bfc6df4c134a82131736bcb1cdcf8184fb6ce5c1cd46a8d8a2857cf1b1443

Contents?: true

Size: 775 Bytes

Versions: 11

Compression:

Stored size: 775 Bytes

Contents

module EventSourcery
  Error = Class.new(StandardError)
  UnableToLockProcessorError = Class.new(Error)
  ConcurrencyError = Class.new(Error)
  AtomicWriteToMultipleAggregatesNotSupported = Class.new(Error)
  MultipleCatchAllHandlersDefined = Class.new(Error)

  class EventProcessingError < Error
    attr_reader :event, :processor

    def initialize(event:, processor:)
      @event = event
      @processor = processor
    end

    def message
      parts = []
      parts << "#<#{processor.class} @@processor_name=#{processor.processor_name.inspect}>"
      parts << "#<#{event.class} @id=#{event.id.inspect}, @uuid=#{event.uuid.inspect}, @type=#{event.type.inspect}>"
      parts << "#<#{cause.class}: #{cause.message}>"
      parts.join("\n") + "\n"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
event_sourcery-1.0.0 lib/event_sourcery/errors.rb
event_sourcery-0.24.0 lib/event_sourcery/errors.rb
event_sourcery-0.23.1 lib/event_sourcery/errors.rb
event_sourcery-0.23.0 lib/event_sourcery/errors.rb
event_sourcery-0.22.0 lib/event_sourcery/errors.rb
event_sourcery-0.21.0 lib/event_sourcery/errors.rb
event_sourcery-0.20.0 lib/event_sourcery/errors.rb
event_sourcery-0.19.0 lib/event_sourcery/errors.rb
event_sourcery-0.18.0 lib/event_sourcery/errors.rb
event_sourcery-0.17.0 lib/event_sourcery/errors.rb
event_sourcery-0.16.1 lib/event_sourcery/errors.rb