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