Print more program error info to user when using CLI (#8098)

This commit is contained in:
Jack May
2020-02-03 17:14:53 -08:00
committed by GitHub
parent 0c8cee8c4a
commit 336d5136bf
3 changed files with 14 additions and 10 deletions

View File

@ -1765,6 +1765,12 @@ where
{
if let Some(specific_error) = E::decode_custom_error_to_enum(code) {
error!("{}::{:?}", E::type_of(), specific_error);
eprintln!(
"Program Error ({}::{:?}): {}",
E::type_of(),
specific_error,
specific_error
);
return Err(specific_error.into());
}
}