use thiserror::Error;
use crate::sys::SyscallError;
#[derive(Error, Debug)]
pub enum PinError {
#[error("the BPF object `{name}`'s FD is not known")]
NoFd {
name: String,
},
#[error("invalid pin path `{}`", path.display())]
InvalidPinPath {
path: std::path::PathBuf,
#[source]
error: std::ffi::NulError,
},
#[error(transparent)]
SyscallError(#[from] SyscallError),
}