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

Introduce custom exceptions #97

Merged
merged 5 commits into from
Dec 29, 2015
Merged

Introduce custom exceptions #97

merged 5 commits into from
Dec 29, 2015

Conversation

jdemaeyer
Copy link
Contributor

This introduces custom exception classes, all derived from click.ClickException. While there is currently no use for flow control, this has two main advantages:

  • We can set default error messages for common errors, with the possibility to add default exit codes if we wish
  • In tests, we no longer need to look for specific strings to check whether the correct error was raised

Also includes improvements in the config error messages (mainly when specifying undefined/invalid targets)

pablohoffman added a commit that referenced this pull request Dec 29, 2015
@pablohoffman pablohoffman merged commit a95b912 into master Dec 29, 2015
@jdemaeyer jdemaeyer deleted the custom-exceptions branch February 16, 2016 12:58
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.

None yet

2 participants