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

[bug] Improper implementation of click causes errors while handling exceptions #232

Open
nikochiko opened this issue Dec 28, 2019 · 0 comments · May be fixed by #242
Open

[bug] Improper implementation of click causes errors while handling exceptions #232

nikochiko opened this issue Dec 28, 2019 · 0 comments · May be fixed by #242

Comments

@nikochiko
Copy link
Contributor

nikochiko commented Dec 28, 2019

Current behavior:
While displaying the errors, click.style is being called on the errors to make the colors consistent. However, this implementation is not correct as click.style does not support an Exception as an argument, hence it raises an error on its own. See this snap:
cli-bug-error-formatting

Expected:
The error message should be displayed. Like:
cli-bug-working


Another option to still retain the styling and colors is to call str() on the errors first.
i.e.

echo(style(str(exception), ... ))
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 a pull request may close this issue.

1 participant