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

28 lines
546 B
Rust

use std::io;
use miette::Diagnostic;
use thiserror::Error;
use crate::repository::config::ConfigError;
use super::mapped_command::CommandError;
pub type MapperResult<T> = Result<T, MapperError>;
#[derive(Error, Diagnostic, Debug)]
pub enum MapperError {
#[error("Config error: {0}")]
Config(
#[from]
#[source]
#[diagnostic_source]
ConfigError,
),
#[error("Failed to execute mapped command: {0}")]
Command(#[from] CommandError),
#[error("IO Error: {0}")]
Io(#[from] io::Error),
}