Skip to content
This repository was archived by the owner on Feb 28, 2021. It is now read-only.

cli: use thiserror for CommandError Display #317

Merged
merged 3 commits into from
Apr 2, 2020
Merged

Conversation

NunoAlexandre
Copy link
Contributor

Closes #308

I thought we had more error types in the CLI in need of this but it turns out that only CommandError was missing.

@NunoAlexandre NunoAlexandre requested a review from a team March 31, 2020 15:08
@NunoAlexandre NunoAlexandre self-assigned this Mar 31, 2020
@CodeSandwich CodeSandwich requested review from CodeSandwich and removed request for a team March 31, 2020 15:14
@CodeSandwich
Copy link
Contributor

It's good to have a function that catches errors on the top-most level in main.rs and nicely formats them in a loop unpacking and printing sources, e.g. each layer of causality in one line, maybe prefixed with caused by or a growing indentation or an arrow.

NunoAlexandre and others added 2 commits April 2, 2020 13:39
Make them more granular for reads and writes and don't prefix their
display message with "Account storage error".
Copy link
Contributor

@CodeSandwich CodeSandwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not drag this any longer. For me it's already good, we can discuss and make it perfect for everybody later.

@NunoAlexandre NunoAlexandre merged commit d7221a8 into master Apr 2, 2020
@NunoAlexandre NunoAlexandre deleted the cli/thiserror branch April 2, 2020 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli: Use thiserror for all error types
4 participants