You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in the anoma CLIs we sometimes handle errors by calling eprintln! with a human-friendly error message, then exiting the process with status code 1, other times we just attempt an .unwrap() which panics and displays an output more helpful to developers.
We could consolidate how we're handling errors:
start returning Result<()> instead of safe exiting inside our functions; e.g. use .await? rather than await.unwrap() to return errors when they happen rather than panicking
change existing eprintln! calls to returning a Result<()>
at the top level, catch returned Err(error)s and always both eprintln! the Display trait output for users and log (i.e. tracing::error!) the Debug output for developers, as currently we may only get one or the other
This could be done nearer Namada release as part of polishing up if there is time
The text was updated successfully, but these errors were encountered:
Currently in the anoma CLIs we sometimes handle errors by calling
eprintln!
with a human-friendly error message, then exiting the process with status code 1, other times we just attempt an.unwrap()
which panics and displays an output more helpful to developers.We could consolidate how we're handling errors:
Result<()>
instead of safe exiting inside our functions; e.g. use.await?
rather thanawait.unwrap()
to return errors when they happen rather than panickingeprintln!
calls to returning aResult<()>
Err(error)
s and always botheprintln!
theDisplay
trait output for users and log (i.e.tracing::error!
) theDebug
output for developers, as currently we may only get one or the otherThis could be done nearer Namada release as part of polishing up if there is time
The text was updated successfully, but these errors were encountered: