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

change exit to raise ValueError #13

Merged
merged 1 commit into from
Feb 21, 2021
Merged

change exit to raise ValueError #13

merged 1 commit into from
Feb 21, 2021

Conversation

ipl31
Copy link
Contributor

@ipl31 ipl31 commented Feb 21, 2021

exit is meant for CLI programs. Its not good for an API because it does not allow the caller to handle any errors, it just exits the process. Raising an exception here is the right thing to do. I picked ValueError.

@daxm
Copy link
Owner

daxm commented Feb 21, 2021

I've probably used exit(1) in other places too. :-) I'll hunt through the code and update with your way.

@daxm daxm merged commit 6fa6754 into daxm:master Feb 21, 2021
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