Skip to content

Exceptions question #83

Description

@rob-ross

In exceptions.py JSONPointerIndexError, JSONPointerKeyError, and JSONPointerTypeError use multiple inheritance to extend from both JSONPointerResolutionError, and IndexError, KeyError, and TypeError respectively.

Java doesn't have multiple class inheritance. I could get tricky with using interfaces to try to duplicate this, but first I wanted to ask what is your design goal with this class hierarchy? In test_json_pointer.py, you're catching the Python built-ins and not your custom Error classes. Is there a reason you are not just catching JSONPointerIndexError, JSONPointerKeyError, and JSONPointerTypeError?

Thanks!

  • Rob

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions