You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nenv/src/mapper/error.rs

26 lines
519 B
Rust

use std::{io, path::PathBuf};
use miette::Diagnostic;
use thiserror::Error;
use super::mapped_command::CommandError;
pub type MapperResult<T> = Result<T, MapperError>;
#[derive(Error, Diagnostic, Debug)]
pub enum MapperError {
#[error("Failed to execute mapped command")]
Command(#[from] CommandError),
#[error("IO operation failed")]
Io(#[from] io::Error),
#[error("Failed to map directory {src:?}")]
DirMapping {
src: PathBuf,
#[source]
err: io::Error,
},
}