You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: