Skip to content

how to print out the line which causing exception? #806

Description

@todatamining

Something wrong with my json, but it just print out:

[json.exception.type_error.302] type must be array, but is null

From the error, it is hard to tell which line is wrong in the json file or my code, is there a way to print out the line causing exception?

update:
I check the json, the error is causing by the following line:

{
"email": [....]
}

in the code, there is a typo

vector emails = info["emails"]; //should be "email"

is it possible to print out the line#?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions