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
In some cases, e.g. SQLalchemy, serialized objects cannot be easily statically typed checked. Serialization type checking errors should then be enough informative to quickly spot the invalid object.
However, normal use case remains unchecked serialization (for now). Error location tracing must thus have minimal impact on the implementation and the performance. Also, collecting all errors is not considered, as its impact would certainly be too much important.
Two possible implementations are considered first:
Add try catch around submethod calls, and add the current error path component to the error caught before reraising it.
Add an additional argument to every method for the error path component (with a None default value), and try catch only in the type checking methods.
Both of these methods impact the unchecked implementation, so both implementation should be tried and compared, especially in term of performance.
Also, serialization type checking error should have a custom class (why not deriving TypeError) to store the path and found/expected types (and why not the faulty object, as it could be nice to have for debugging, idk), with a custom __str__ method.
See #258 for the initial discussion.
The text was updated successfully, but these errors were encountered: