Skip to content

More meaningful error message #135

Open
@Odonno

Description

@Odonno

The current reader throws an error when it finds a mismatched byte in the byte array. When this happens, we got an error along with a concrete StackTrace. The error generated could look like this:

CborException: [129] Expected major type TextString (3)

While it is helpful to detect which byte could be the source of the problem, it does not give much information about where in the POCO model the issue happens. I am curious to know if we could offer an error message that look like one of these:

CborException: [129] Expected major type TextString (3). Failed to deserialize at root level.
CborException: [129] Expected major type TextString (3). Failed to deserialize from "Array[7].Object.PropertyA".

This obsviously need the reader to traverse and collect the different levels, at least from object and array deserialization.

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