1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std::{env::VarError, io::Error as IoError};
use thiserror::Error;

#[derive(Error, Debug)]
pub enum DetectionError {
    #[error("environment var error")]
    VarError(#[from] VarError),
    #[error("child process failed")]
    IoError(#[from] IoError),
    #[error("unsupported desktop")]
    UnsupportedDesktopError,
    #[error("failed to parse config file")]
    IniParseError(String),
    #[error("terminal not found in desktop config")]
    DEFindError,
    #[error("no known terminal found in path")]
    FindError,
    #[error("failed to detect terminal")]
    MetaError(Vec<DetectionError>),
}