-
Notifications
You must be signed in to change notification settings - Fork 122
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
Avoid exception traceback with "towncrier check" #336
Comments
Thanks the report. Agree. As commented in 306, either use click exception, or add code to handle For this particular case maybe raise click.FileError ? https://click.palletsprojects.com/en/7.x/exceptions/#which-exceptions-exist |
Can I work on this? |
Hi @chrysle You are welcome to give this a try. You can create a PR and write the minimal test for it to check that the full traceback is no longer visible. |
I don't think this will be much less frightening (?):
|
The problem is that if the It would maybe be better just to print:
|
The last suggestion is ok. |
@adiroiban Could you make a suggestion for a test? My problem is that there is no suitable assert in the trial assertions , like |
Situation
When calling
towncrier check
in a directory without any Towncrier config files, you get this exception:Proposed solution
The traceback shouldn't be displayed. Don't frighten our users. 😉 IMHO it's completely enough if we catch it and output only the error message:
Possible dependencies
Maybe related to #306
The text was updated successfully, but these errors were encountered: