Skip to content

Add "current token" info into MismatchedInputException #5179

@cowtowncoder

Description

@cowtowncoder

(follow-up to FasterXML/jackson-core#1438)

Since "current token" (JsonParser.currentToken()) will be cleared when parser is closed, information from MismatchedInputException and sub-types won't be available if exception handling calls close().
This occurs typically with higher-level calls, like jackson-databind "readValue()" calls via ObjectMapper and ObjectReader, where JsonParser is auto-closed.

As one thing to address this, let's get and store _currToken as an accessible property of MismatchedInputException.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.20Issues planned at 2.20 or later

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions