reth_exex/wal/
error.rs

1//! Wal Errors
2
3use std::path::PathBuf;
4
5/// Wal Result type.
6pub type WalResult<T> = Result<T, WalError>;
7
8/// Wal Error types
9#[derive(Debug, thiserror::Error)]
10pub enum WalError {
11    /// Filesystem error at the path
12    #[error(transparent)]
13    FsPathError(#[from] reth_fs_util::FsPathError),
14    /// Directory entry reading error
15    #[error("failed to get {0} directory entry: {1}")]
16    DirEntry(PathBuf, std::io::Error),
17    /// Error when reading file metadata
18    #[error("failed to get metadata for file {0}: {1}")]
19    FileMetadata(u32, std::io::Error),
20    /// Parse error
21    #[error("failed to parse file name: {0}")]
22    Parse(String),
23    /// Notification not found error
24    #[error("notification {0} not found")]
25    FileNotFound(u32),
26    /// Decode error
27    #[error("failed to decode notification {0} from {1}: {2}")]
28    Decode(u32, PathBuf, rmp_serde::decode::Error),
29}