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

Print errors in a friendlier way #3

Closed
phseiff opened this issue Jul 12, 2020 · 0 comments
Closed

Print errors in a friendlier way #3

phseiff opened this issue Jul 12, 2020 · 0 comments
Labels
fixed The issue was fixed. usability Something obfuscates usability, like an error in the help documentation
Milestone

Comments

@phseiff
Copy link
Owner

phseiff commented Jul 12, 2020

Currently, any error (caused by wrong user input or lacking internet connection) is raised as a Python Exception, including a printed message with the line number and other technical detail. This is the expected behavior when using the module from Python, but not when using it as a tool from the command line. Thus, when running main() from the if __name__ == "__main__"-clause, exceptions should be caught from outside the main()-call and printed as a string containing only the error message. In some cases, such as failing web requests, it might even be useful to let main() raise a custom, more explanatory exception than the obligatory exception provided by the python requests-library.

@phseiff phseiff added the usability Something obfuscates usability, like an error in the help documentation label Jul 12, 2020
@phseiff phseiff added this to the 1.0.3 milestone Jul 12, 2020
@phseiff phseiff closed this as completed Jul 16, 2020
@phseiff phseiff added the fixed The issue was fixed. label Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed The issue was fixed. usability Something obfuscates usability, like an error in the help documentation
Projects
None yet
Development

No branches or pull requests

1 participant