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

Add exception handling guidelines #1131

Open
lukpueh opened this issue Sep 10, 2020 · 4 comments
Open

Add exception handling guidelines #1131

lukpueh opened this issue Sep 10, 2020 · 4 comments
Labels
discussion Discussions related to the design, implementation and operation of the project documentation Documentation of the project as well as procedural documentation

Comments

@lukpueh
Copy link
Member

lukpueh commented Sep 10, 2020

Which exceptions should be handled, which exceptions should be propagated to the user? When should we use custom exceptions, when should we use built-in exceptions? etc...

The Google Python style-guide has some reasonable suggestions about exceptions.

@lukpueh lukpueh added discussion Discussions related to the design, implementation and operation of the project documentation Documentation of the project as well as procedural documentation labels Sep 10, 2020
@lukpueh
Copy link
Member Author

lukpueh commented Sep 10, 2020

See related #967

@MVrachev
Copy link
Collaborator

MVrachev commented Sep 23, 2020

Don't you think this issue needs a label decision record ?
When you create guidelines for something used in multiple places like exceptions maybe it's a good idea to record it.

Same question for issues #1132, #1130, #1129 and #1125.

@joshuagl
Copy link
Member

I'm not sure if it's deserving of a separate label, but we should make it clear that the result of every discussion should be documented. Whether a decision record, contributor guideline or some other form.

@lukpueh
Copy link
Member Author

lukpueh commented Sep 28, 2020

Good point @MVrachev. But how would the decision record about exception guidelines differ from the exception guideline document itself? I think the reason why I didn't use the label here is because I envisioned the guideline document itself a good central place that justifies the way exceptions are handled in multiple places, and probably this issue page as easily identifiable place to look up any additional discussion, that are not part of the guideline document.

That said, I do see how it's not always clear if something classifies for a decision record or not. A general rule of thumb to classify something could be:

"The decision is worth being tracked and there is no easily identifiable place (e.g. PR or issue page, commit message, code comment, other documentation or guideline, etc...) for it to be tracked at."

What do you think? At any rate, we should make this clear as part of #1141.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussions related to the design, implementation and operation of the project documentation Documentation of the project as well as procedural documentation
Projects
None yet
Development

No branches or pull requests

3 participants