exceptions

A few exception classes are defined by the library to indicate particular kinds of error.

exception eventsourcing.exceptions.EventSourcingError[source]

Bases: Exception

Base eventsourcing exception.

exception eventsourcing.exceptions.TopicResolutionError[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when unable to resolve a topic to a Python class.

exception eventsourcing.exceptions.EntityVersionNotFound[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raise when accessing an entity version that does not exist.

exception eventsourcing.exceptions.RecordConflictError[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when database raises an integrity error.

exception eventsourcing.exceptions.PromptFailed[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when prompt fails.

exception eventsourcing.exceptions.ConcurrencyError[source]

Bases: eventsourcing.exceptions.RecordConflictError

Raised when a record conflict is due to concurrency.

exception eventsourcing.exceptions.ConsistencyError[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when applying an event stream to a versioned entity.

exception eventsourcing.exceptions.MismatchedOriginatorError[source]

Bases: eventsourcing.exceptions.ConsistencyError

Raised when applying an event to an inappropriate object.

exception eventsourcing.exceptions.OriginatorIDError[source]

Bases: eventsourcing.exceptions.MismatchedOriginatorError

Raised when applying an event to the wrong entity or aggregate.

exception eventsourcing.exceptions.OriginatorVersionError[source]

Bases: eventsourcing.exceptions.MismatchedOriginatorError

Raised when applying an event to the wrong version of an entity or aggregate.

exception eventsourcing.exceptions.MutatorRequiresTypeNotInstance[source]

Bases: eventsourcing.exceptions.ConsistencyError

Raised when mutator function received a class rather than an entity.

exception eventsourcing.exceptions.DataIntegrityError[source]

Bases: ValueError, eventsourcing.exceptions.EventSourcingError

Raised when a sequenced item is damaged (hash doesn’t match data)

exception eventsourcing.exceptions.EventHashError[source]

Bases: eventsourcing.exceptions.DataIntegrityError

Raised when an event’s seal hash doesn’t match the hash of the state of the event.

exception eventsourcing.exceptions.HeadHashError[source]

Bases: eventsourcing.exceptions.DataIntegrityError, eventsourcing.exceptions.MismatchedOriginatorError

Raised when applying an event with hash different from aggregate head.

exception eventsourcing.exceptions.EntityIsDiscarded[source]

Bases: AssertionError

Raised when access to a recently discarded entity object is attempted.

exception eventsourcing.exceptions.ProgrammingError[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when programming errors are encountered.

exception eventsourcing.exceptions.RepositoryKeyError[source]

Bases: KeyError, eventsourcing.exceptions.EventSourcingError

Raised when using entity repository’s dictionary like interface to get an entity that does not exist.

exception eventsourcing.exceptions.ArrayIndexError[source]

Bases: IndexError, eventsourcing.exceptions.EventSourcingError

Raised when appending item to an array that is full.

exception eventsourcing.exceptions.DatasourceSettingsError[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when an error is detected in settings for a datasource.

exception eventsourcing.exceptions.OperationalError[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when an operational error is encountered.

exception eventsourcing.exceptions.TimeSequenceError[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when a time sequence error occurs e.g. trying to save a timestamp that already exists.

exception eventsourcing.exceptions.TrackingRecordNotFound[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when a tracking record is not found.

exception eventsourcing.exceptions.CausalDependencyFailed[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when a causal dependency fails (after its tracking record not found).

exception eventsourcing.exceptions.EventRecordNotFound[source]

Bases: eventsourcing.exceptions.EventSourcingError

Raised when an event record is not found.

exception eventsourcing.exceptions.EncoderTypeError[source]

Bases: TypeError