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

Better exception handling for Dataset types #1986

Closed
philippjfr opened this issue Oct 9, 2017 · 3 comments
Closed

Better exception handling for Dataset types #1986

philippjfr opened this issue Oct 9, 2017 · 3 comments

Comments

@philippjfr
Copy link
Member

I've been thinking about how we can improve validation and exception handling for Dataset types for quite a while and have come up with a proposal that I think will work. First let me outline what the current issues are and then suggest how to address them.

The current approach iterates over the defined interfaces, if the type of the data matches the type of one of the declared interfaces it will prioritize that interface and then try all the other interfaces one by one. Since it goes through each interface one by one we can't raise the exception raised by any particular interface.

My proposal is that we add pre-validation that can raise exceptions before actually trying to initialize an interface. The Interface baseclass will implement pre-validation for all the basic literal types (tuples, dictionaries, lists of coordinates) and concrete interfaces implements pre-validation for any other types.

@jbednar
Copy link
Member

jbednar commented Oct 16, 2017

I think this SO issue is an example of why we need something like this approach.

@philippjfr
Copy link
Member Author

Going to close this as it is superseded by a simpler approach implemented in #2041.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants