Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Better error printing #327

Merged
merged 7 commits into from
Jul 22, 2019
Merged

Better error printing #327

merged 7 commits into from
Jul 22, 2019

Conversation

xortive
Copy link
Contributor

@xortive xortive commented Jul 17, 2019

The default Termination impl for Result uses Debug to print any Result::Err returned by main. This PR overrides that behavior by moving the contents of main into a wrapper function that we can print the result of ourselves using Display instead.
This will print errors in a more human readable fashion.

src/terminal/emoji.rs Outdated Show resolved Hide resolved
@xortive
Copy link
Contributor Author

xortive commented Jul 17, 2019

https://github.com/tismith/exitfailure might be a better solution

src/terminal/emoji.rs Outdated Show resolved Hide resolved
src/terminal/emoji.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@EverlastingBugstopper EverlastingBugstopper left a comment

Choose a reason for hiding this comment

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

LGTM

@xortive xortive merged commit b5163cf into master Jul 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the malonso/feat-better-error-printing branch July 22, 2019 22: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.

3 participants