mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-02 19:15:12 -05:00
21 lines
557 B
Rust
21 lines
557 B
Rust
use reth_fs_util::FsPathError;
|
|
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug, Clone, PartialEq, Eq)]
|
|
/// Storage lock error.
|
|
pub enum StorageLockError {
|
|
/// Write lock taken
|
|
#[error("storage directory is currently in use as read-write by another process: {0}")]
|
|
Taken(usize),
|
|
/// Indicates other unspecified errors.
|
|
#[error("{0}")]
|
|
Other(String),
|
|
}
|
|
|
|
/// TODO: turn into variant once ProviderError
|
|
impl From<FsPathError> for StorageLockError {
|
|
fn from(source: FsPathError) -> Self {
|
|
Self::Other(source.to_string())
|
|
}
|
|
}
|