Skip to content

More context in error messages #29

@emoon

Description

@emoon

Hi,

Thanks for a great crate!

My plan is to use it for user configuration and one issue I have is that if a user makes an error in the configuration I would like to report back a meaningful error. In this case for example an extra , has been added on bar

"some_data":{
    "foo": 0,
    "bar": 42,
},

The error I get back is UnexpectedToken("BraceOff") which is correct but I have no idea of where the error occurs. I'm not sure if the code keeps track of line numbers but it would be very helpful if it could report on which line the error happen so I could report that back to the user.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions