Exception: Acta::ReplayHaltedByUpcaster
- 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
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record:, reason:) ⇒ ReplayHaltedByUpcaster
constructor
A new instance of ReplayHaltedByUpcaster.
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
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
107 108 109 |
# File 'lib/acta/errors.rb', line 107 def reason @reason end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
107 108 109 |
# File 'lib/acta/errors.rb', line 107 def record @record end |