Skip to content

Add exception handling guidelines #1131

Description

@lukpueh

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.

Activity

  1. added
    discussionDiscussions related to the design, implementation and operation of the project
    documentationDocumentation of the project as well as procedural documentation
    on Sep 10, 2020
  2. lukpueh commented on Sep 10, 2020

    @lukpueh
    MemberAuthor

    See related #967

  3. MVrachev commented on Sep 23, 2020

    @MVrachev
    Collaborator

    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.

  4. joshuagl commented on Sep 28, 2020

    @joshuagl
    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.

  5. lukpueh commented on Sep 28, 2020

    @lukpueh
    MemberAuthor

    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.

  6. lukpueh commented on Apr 1, 2025

    @lukpueh
    MemberAuthor

    As development has slowed down, due to the maturity of the code base, this request has become a lot less relevant. I suggest to close until this becomes an issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionDiscussions related to the design, implementation and operation of the projectdocumentationDocumentation of the project as well as procedural documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions