Skip to content

Exceptions catching - #3235

Open
sandwwraith wants to merge 4 commits into
devfrom
exceptions-catching
Open

Exceptions catching#3235
sandwwraith wants to merge 4 commits into
devfrom
exceptions-catching

Conversation

@sandwwraith

Copy link
Copy Markdown
Member

Add exception handling to encode/decodeSerializableValue in Json codecs

Wrapping custom exceptions into JsonDecodingException allows to add context information to them (such as offset and path).

Fixes #3111
Fixes #2165
Wrapping custom exceptions into JsonEncodingException allows to better maintain exception contract (only SerializationException or IAE should be thrown from encode*) and also adds some context when avaialable.

#3111
#2165
Since all exceptions are handled in encode/decodeSerializableElement, additional try-catch is no longer needed and we can add more context information to a 'Subclass is not registered' exception

#3111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant