Class ErasedStreamRepublicationException
- Namespace
- Excalibur.EventSourcing
- Assembly
- Excalibur.EventSourcing.Abstractions.dll
The exception thrown when a save is recognised as an already-committed retry whose events are no longer retrievable, so the repository refuses to republish the caller's live in-memory payloads.
public sealed class ErasedStreamRepublicationException : InvalidOperationException, ISerializable
- Inheritance
-
ErasedStreamRepublicationException
- Implements
- Inherited Members
Remarks
The shape it closes. An append commits, its acknowledgement is lost, the events are erased, and the caller — still holding the aggregate it built the payloads from — retries the save. The store recognises its own rows by identity and answers AlreadyCommitted, because the append genuinely did commit. What has stopped being true is that present implies retrievable. Continuing from there would stage those payloads to the outbox and hand them to its post-commit notification handlers, publishing data that was destroyed on purpose — after the destruction had already been certified, and with nothing downstream ever learning.
It carries no identifiers by design. The type is the whole signal: a caller that needs to know catches it. The message names no aggregate, no subject and no payload, so that neither a surfaced exception message nor a log line built from one can disclose which subject was involved.
What the caller should do. Discard the in-memory aggregate and reload it. Nothing was staged and nothing was notified, so there is nothing to compensate; the append itself remains durable and erased. Retrying the same in-memory instance will throw again, which is the intended behaviour.
Constructors
ErasedStreamRepublicationException()
Initializes a new instance of the ErasedStreamRepublicationException class with the defined, identifier-free message.
public ErasedStreamRepublicationException()
ErasedStreamRepublicationException(string?)
Initializes a new instance of the ErasedStreamRepublicationException class.
public ErasedStreamRepublicationException(string? message)
Parameters
messagestringThe message. Callers within the framework use the parameterless constructor; this overload exists for the exception contract and MUST NOT be passed an aggregate identifier, a subject identifier or any payload.
ErasedStreamRepublicationException(string?, Exception?)
Initializes a new instance of the ErasedStreamRepublicationException class.
public ErasedStreamRepublicationException(string? message, Exception? innerException)