Skip to content

[core] Error handling in PMD 7 #3761

Open

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)

Activity

  1. added this to the 7.0.0 milestone on Apr 7, 2022
  2. modified the milestones: 7.0.0, 7.x on Jan 23, 2023
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions