Skip to content

Failed ParseResult needs reference to the source file #4786

@ajoshi66

Description

@ajoshi66

JavaParser version: 3.26.2
JDK version: 21

Context:

I obtained the ParseResults using SourceRoot.tryToParse() on a source root. For the unsuccessful parse, the ParseResult.getResult() is null, which is fair. However, I get only the list of Problem having error message and stack trace, but not the reference to the file that failed parsing. It would be helpful to include at least the FQN to the class name or the path to the source file. If it is possible keep reference to unparsed file as broken, it would be wonderful, so that I can get the contents as text continue the processing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementNot a bug, but a way that JP can be be enhanced to work better.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions