use thiserror::Error;
use tokio::task::JoinError;
#[derive(Error, Debug)]
pub enum ProcfsError {
#[error("Procfs not initialized, call init first")]
NotInitialized,
#[error(transparent)]
Procfs(#[from] procfs::ProcError),
#[error(transparent)]
Io(#[from] std::io::Error),
#[error("Failed to join tokio task: {0}")]
JoinError(
#[from]
#[source]
JoinError,
),
#[error("procfs source mutex poisoned.")]
MutexPoisoned,
}