Exception: Acta::ReplayHaltedByUpcaster

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

Overview

Raised by ‘context.fail_replay!(reason)` inside an upcaster block. Halts replay so the operator can investigate rather than land a partial, possibly-corrupt projection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record:, reason:) ⇒ ReplayHaltedByUpcaster

Returns a new instance of ReplayHaltedByUpcaster.



109
110
111
112
113
114
115
116
# File 'lib/acta/errors.rb', line 109

def initialize(record:, reason:)
  @record = record
  @reason = reason
  super(
    "Upcaster halted replay on event id=#{record.id} uuid=#{record.uuid} " \
    "(#{record.event_type} v#{record.event_version}): #{reason}"
  )
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



107
108
109
# File 'lib/acta/errors.rb', line 107

def reason
  @reason
end

#recordObject (readonly)

Returns the value of attribute record.



107
108
109
# File 'lib/acta/errors.rb', line 107

def record
  @record
end