aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: 9b65d6afb6e82d754b79939f0457f8b11e94124b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#[derive(thiserror::Error, Debug)]
pub enum Error {
    #[error("error creating pty")]
    CreatePty(#[source] nix::Error),

    #[error("error opening pts at {0}")]
    OpenPts(std::path::PathBuf, #[source] std::io::Error),

    #[error("error setting terminal size")]
    SetTermSize(#[source] nix::Error),

    #[error("error spawning subprocess")]
    Spawn(#[source] std::io::Error),

    #[error("error spawning subprocess")]
    SpawnNix(#[source] nix::Error),
}

pub type Result<T> = std::result::Result<T, Error>;