Skip to content

InstantSerializer: Passing an invalid string does not yield a SerializationException #169

Closed
@florianmutter

Description

@florianmutter

Passing a string that is not a date (e.g. "abc") does not yield a SerializationException. Instead it will yield this exception:

kotlinx.datetime.DateTimeFormatException: java.time.format.DateTimeParseException: Text 'abc' could not be parsed at index 0

In my opinion this excpetion should be wrapped in a SerializationException to be able to have generic error handling if deserialization fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions