Exception: Acta::ProjectionError

Inherits:
Error
  • Object
show all
Defined in:
lib/acta/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event:, projection_class:, original:) ⇒ ProjectionError

Returns a new instance of ProjectionError.



29
30
31
32
33
34
# File 'lib/acta/errors.rb', line 29

def initialize(event:, projection_class:, original:)
  @event = event
  @projection_class = projection_class
  @original = original
  super("Projection #{projection_class} failed on #{event.event_type}: #{original.message}")
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



27
28
29
# File 'lib/acta/errors.rb', line 27

def event
  @event
end

#originalObject (readonly)

Returns the value of attribute original.



27
28
29
# File 'lib/acta/errors.rb', line 27

def original
  @original
end

#projection_classObject (readonly)

Returns the value of attribute projection_class.



27
28
29
# File 'lib/acta/errors.rb', line 27

def projection_class
  @projection_class
end