openrr_apps/
error.rs

1use std::path::PathBuf;
2
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6#[non_exhaustive]
7pub enum Error {
8    #[error("openrr-apps: No ConfigPath is specified.")]
9    NoConfigPath,
10    #[error("openrr-apps: No command is specified.")]
11    NoCommand,
12    #[error("openrr-apps: Failed to parse {:?} as toml ({}).", .0, .1)]
13    TomlParseFailure(PathBuf, #[source] toml::de::Error),
14    #[error("openrr-apps: No File {:?} is found ({}).", .0, .1)]
15    NoFile(PathBuf, #[source] std::io::Error),
16    #[error("openrr-apps: No ParentDirectory {:?} is found.", .0)]
17    NoParentDirectory(PathBuf),
18    #[error("openrr-apps: No SpecifiedMode {:?} is found.", .0)]
19    NoSpecifiedMode(String),
20    #[error("openrr-apps: No {:?} plugin instance {:?} is found", kind, name)]
21    NoPluginInstance { kind: String, name: String },
22    #[error("openrr-apps: {}", .0)]
23    DuplicateInstance(String),
24    #[error("openrr-apps: Config {:?} requires ros feature.", .0)]
25    ConfigRequireRos(String),
26    #[error("openrr-apps: urdf: {:?}", .0)]
27    Urdf(#[from] urdf_rs::UrdfError),
28    #[error("openrr-apps: arci: {:?}", .0)]
29    Arci(#[from] arci::Error),
30    #[error("openrr-apps: openrr-client: {:?}", .0)]
31    OpenrrClient(#[from] openrr_client::Error),
32    #[error("openrr-apps: openrr-command: {:?}", .0)]
33    OpenrrCommand(#[from] openrr_command::Error),
34}