openrr_client/
error.rs

1use std::path::PathBuf;
2
3use thiserror::Error;
4use urdf_rs::UrdfError;
5
6#[derive(Debug, Error)]
7#[non_exhaustive]
8pub enum Error {
9    #[error("openrr-client: arci: {:?}", .0)]
10    Arci(#[from] arci::Error),
11    #[error("openrr-client: MismatchedLength {} != {}.", .0, .1)]
12    MismatchedLength(usize, usize),
13    #[error("openrr-client: No File {:?} is found ({}).", .0, .1)]
14    NoFile(PathBuf, #[source] std::io::Error),
15    #[error("openrr-client: No IkClient={} is found.", .0)]
16    NoIkClient(String),
17    #[error("openrr-client: No JointsPose {} {} is found.", .0, .1)]
18    NoJointsPose(String, String),
19    #[error("openrr-client: No HashMap item is found. HashMap={}, Key={}", .0, .1)]
20    NoMapKey(String, String),
21    #[error("openrr-client: No JointTrajectoryClient={} is found.", .0)]
22    NoJointTrajectoryClient(String),
23    #[error("openrr-client: No ParentDirectory {:?} is found.", .0)]
24    NoParentDirectory(PathBuf),
25    #[error("openrr-client: No UrdfPath is specified.")]
26    NoUrdfPath,
27    #[error("openrr-client: Failed to parse {:?} as toml ({}).", .0, .1)]
28    TomlParseFailure(PathBuf, #[source] toml::de::Error),
29    #[error("openrr-client: urdf-rs: {:?}", .0)]
30    UrdfRs(#[from] UrdfError),
31    #[error("openrr-client: Full Chain is none")]
32    FullChainNotFound(String),
33    #[error("openrr-client: Other: {:?}", .0)]
34    Other(#[from] anyhow::Error),
35}