Skip to content

[core] Error handling in PMD 7 #3761

@oowekyala

Description

@oowekyala

This is a general ticket to collect things related to error handling, eg which exception types we should use, what is an error and what is not.

  • New API: FileAnalysisException: supertype for lexer, parser, semantic errors. Has info about the file where the exception happened
  • Revisit exception handling logic with listeners
  • Align CPD errors and PMD errors
  • New concept: Semantic errors. Language specific errors that can skip rule analysis if the code is malformed.

Context:

That's maybe good for now, but we should think about this again. We can't say for all exceptions, that we can simply go on with the analysis and assume the results are valid.
I think, there are certain error conditions, for which is doesn't make sense to even try to run PMD further (although I don't have a good example right now).

Originally posted by @adangel in #3692 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions