|
@@ -176,7 +176,17 @@ impl<'l, Error: CLIError> Attacher<'l, Error> {
|
|
|
}
|
|
|
}
|
|
|
Ok(None) => {
|
|
|
- self.err = Some(Error::no_such_entity());
|
|
|
+ self.err = Some(Error::no_such_entity(
|
|
|
+ E::entity_name(),
|
|
|
+ format!(
|
|
|
+ "{}",
|
|
|
+ self.remote_keys
|
|
|
+ .iter()
|
|
|
+ .cloned()
|
|
|
+ .reduce(|a, b| format!("{},{}", a, b))
|
|
|
+ .unwrap()
|
|
|
+ ),
|
|
|
+ ));
|
|
|
}
|
|
|
Err(e) => {
|
|
|
self.err = Some(e.into());
|
|
@@ -248,7 +258,17 @@ impl<O: CLIObject> ClapInterface<O> {
|
|
|
.unwrap(),
|
|
|
)
|
|
|
.get()?
|
|
|
- .ok_or(<O::Error>::no_such_entity())?;
|
|
|
+ .ok_or(<O::Error>::no_such_entity(
|
|
|
+ O::entity_name(),
|
|
|
+ format!(
|
|
|
+ "{}",
|
|
|
+ local_keys
|
|
|
+ .iter()
|
|
|
+ .cloned()
|
|
|
+ .reduce(|a, b| format!("{},{}", a, b))
|
|
|
+ .unwrap()
|
|
|
+ ),
|
|
|
+ ))?;
|
|
|
|
|
|
let mut attacher = Attacher {
|
|
|
do_attach: true,
|
|
@@ -283,7 +303,17 @@ impl<O: CLIObject> ClapInterface<O> {
|
|
|
.unwrap(),
|
|
|
)
|
|
|
.get()?
|
|
|
- .ok_or(<O::Error>::no_such_entity())?;
|
|
|
+ .ok_or(<O::Error>::no_such_entity(
|
|
|
+ O::entity_name(),
|
|
|
+ format!(
|
|
|
+ "{}",
|
|
|
+ local_keys
|
|
|
+ .iter()
|
|
|
+ .cloned()
|
|
|
+ .reduce(|a, b| format!("{},{}", a, b))
|
|
|
+ .unwrap()
|
|
|
+ ),
|
|
|
+ ))?;
|
|
|
|
|
|
let mut attacher = Attacher {
|
|
|
do_attach: false,
|
|
@@ -313,7 +343,16 @@ impl<O: CLIObject> ClapInterface<O> {
|
|
|
UniqueList::<O>::build_equivalent(keys.iter().map(String::as_str)).unwrap(),
|
|
|
)
|
|
|
.get()?
|
|
|
- .ok_or(<O::Error>::no_such_entity())?;
|
|
|
+ .ok_or(<O::Error>::no_such_entity(
|
|
|
+ O::entity_name(),
|
|
|
+ format!(
|
|
|
+ "{}",
|
|
|
+ keys.iter()
|
|
|
+ .cloned()
|
|
|
+ .reduce(|a, b| format!("{},{}", a, b))
|
|
|
+ .unwrap()
|
|
|
+ ),
|
|
|
+ ))?;
|
|
|
println!("{:#?}", obj.as_ref());
|
|
|
|
|
|
fn inspect_ai<AI: AssocInterface>(name: &'static str, ai: &AI) {
|