gadget_sdk/executor/process/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("A process exited unexpectedly")]
    UnexpectedExit,
    #[error("Process {0} doesn't exist")]
    ProcessNotFound(sysinfo::Pid),
    #[error("Failed to focus on {0}, it does not exist")]
    ServiceNotFound(String),
    #[error("Expected {0} and found {1} running instead - process termination aborted")]
    ProcessMismatch(String, String),
    #[error("Failed to kill process, errno: {0}")]
    KillFailed(nix::errno::Errno),
    #[error("Output stream error for {0}")]
    StreamError(sysinfo::Pid),
}