Skip to main content

polyc_eventlog/
error.rs

1//! Errors surfaced by the event log.
2
3/// Failures from opening, appending to, or replaying an [`crate::EventLog`].
4///
5/// This is a thin wrapper over the underlying
6/// [`commonware_storage::journal::Error`]: every fallible event-log operation
7/// delegates to the journal primitive, so the storage error is the only failure
8/// mode and is preserved verbatim as the [`Self::Journal`] source.
9#[derive(Debug, thiserror::Error)]
10#[non_exhaustive]
11pub enum EventLogError {
12    /// The underlying commonware-storage journal returned an error while
13    /// opening, appending, committing, or replaying.
14    #[error("event log journal error: {0}")]
15    Journal(#[from] commonware_storage::journal::Error),
16}