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

♻️ Replace logger.error; sys.exit pattern with raise SpecificException pattern #2105

Open
shnizzedy opened this issue May 7, 2024 · 0 comments

Comments

@shnizzedy
Copy link
Member

Where I came upon the pattern:

print(error_message)
sys.exit(exitcode)

, I wasn't consistent. Mostly I updated to something like:

logger.error(error_message)
sys.exit(exitcode)

but sometimes I did like:

raise Exception(error_message)

(but with a more specific error class than Exception). I think we generally want to convert all the sys.exits to raise Exceptions, but this PR's already uncomfortably large without doing so. I think that can be a subsequent PR if we care to.

Originally posted by @shnizzedy in #2062 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant