pavex_cli_client/commands/
errors.rs

1//! Common errors for all CLI commands.
2#[derive(Debug, thiserror::Error)]
3#[error("Failed to invoke `{command}`")]
4pub struct InvocationError {
5    #[source]
6    pub(crate) source: std::io::Error,
7    pub(crate) command: String,
8}
9
10#[derive(Debug, thiserror::Error)]
11#[non_exhaustive]
12#[error("The invocation of `{command}` was terminated by a signal")]
13pub struct SignalTermination {
14    pub(crate) command: String,
15}
16
17#[derive(Debug, thiserror::Error)]
18#[non_exhaustive]
19#[error("The invocation of `{command}` exited with a non-zero status code: {code}")]
20pub struct NonZeroExitCode {
21    pub code: i32,
22    pub(crate) command: String,
23}