-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap errors in dataclass/attrs post-init methods
When decoding/converting to a dataclass/attrs type with a `__post_init__`/`__attrs_post_init__` method, we now wrap all `ValueError`/`TypeError` exceptions in a `ValidationError`. This mirrors the behavior used in the new `Struct.__post_init__` support, and helps provide more uniform error handling support.
- Loading branch information
Showing
3 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters