Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7892

MavenException should be a checked exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0-alpha-7
    • None
    • Core
    • None

    Description

      MavenException is used to report errors in parsing pom.xml files that are external the Maven program itself. Whether they are thrown or not does not indicate a bug in Maven's code. It is an error condition in the user's code that needs to be prepared for and handled by Maven core, much like a program should not assume that a file will be read without IOExceptions or XML parsing errors. Thus this needs to be a checked exception.

      Alternatively, if this is used both for cases that arise from outside Maven's own code and bugs in Maven's code, then two separate exception classes are needed, one checked and one unchecked.

      This is in api/maven-api-core/src/main/java/org/apache/maven/api/services/MavenException.java

      Attachments

        Activity

          People

            Unassigned Unassigned
            elharo Elliotte Rusty Harold
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: