Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(issue-4): make error reporting more user friendly #11

Merged
merged 2 commits into from
Jan 15, 2020
Merged

Conversation

albx79
Copy link
Contributor

@albx79 albx79 commented Jan 15, 2020

Closes #4

Intercept error Results and log them properly, in red, printing only
the description.

This looks a lot better, to a final user, than the
json dump we used to have.

Example:

$ what bump HEAD^^^^^^^^^^^^^^^^^^^^ --strict
WARN - Commit 856bbbb068429221ca58083fe281bf40edbcd9b5 has more than one parent
WARN - Not a conventional commit message: "change license in Cargo"
WARN - Not a conventional commit message: "added CircleCI badge"
WARN - Not a conventional commit message: "added sample circle ci rust config"
WARN - Not a conventional commit message: "Merge branch 'master' of https://github.com/sky-uk/what-bump"
ERROR - Some non-conventional commit messages were encountered while running in `strict` mode

(and it's coloured, too!)

Intercept error `Result`s and log them properly, in red, printing only
the description.

This looks a lot better, to a final user, than the
json dump we used to have.
@albx79 albx79 requested a review from skylupop January 15, 2020 08:32
@albx79 albx79 merged commit eb46d1d into develop Jan 15, 2020
@albx79 albx79 deleted the issues/4 branch January 15, 2020 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error reporting
2 participants