aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
blob: 7521544d91c921156ad0867950e0719207ab5dd9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#[derive(thiserror::Error, Debug)]
pub enum Error {
    #[error("error making pty async")]
    AsyncPty(#[source] std::io::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>;