openrr_command/
error.rs

1use std::path::PathBuf;
2
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6#[non_exhaustive]
7pub enum Error {
8    #[error("openrr-command: No IkClient={} is found.", .0)]
9    NoIkClient(String),
10    #[error("openrr-command: Failed to open {:?} {:?}.", .0, .1)]
11    CommandFileOpenFailure(PathBuf, String),
12    #[error("openrr-command: No Command is specified {:?}.", .0)]
13    NoCommand(Vec<String>),
14    #[error("openrr-command: Failed to execute Command {:?} ({}).", .0, .1)]
15    CommandExecutionFailure(Vec<String>, #[source] std::io::Error),
16    #[error("openrr-command: Command {:?} Error ({:?}).", .0, .1)]
17    CommandFailure(Vec<String>, String),
18    #[error("openrr-command: arci: {:?}", .0)]
19    Arci(#[from] arci::Error),
20    #[error("openrr-command: openrr-client: {:?}", .0)]
21    OpenrrClient(#[from] openrr_client::Error),
22    #[error("openrr-command: rustyline: {:?}", .0)]
23    Rustyline(#[from] rustyline::error::ReadlineError),
24}