Class ModelParseException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ModelParseException
    extends java.io.IOException
    Signals a failure to parse the POM due to invalid syntax (e.g. non-wellformed XML or unknown elements).
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int columnNumber
      The one-based index of the column containing the error.
      private int lineNumber
      The one-based index of the line containing the error.
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelParseException​(java.lang.String message, int lineNumber, int columnNumber)
      Creates a new parser exception with the specified details.
      ModelParseException​(java.lang.String message, int lineNumber, int columnNumber, java.lang.Throwable cause)
      Creates a new parser exception with the specified details.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnNumber()
      Gets the one-based index of the column containing the error.
      int getLineNumber()
      Gets the one-based index of the line containing the error.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • lineNumber

        private final int lineNumber
        The one-based index of the line containing the error.
      • columnNumber

        private final int columnNumber
        The one-based index of the column containing the error.
    • Constructor Detail

      • ModelParseException

        public ModelParseException​(java.lang.String message,
                                   int lineNumber,
                                   int columnNumber)
        Creates a new parser exception with the specified details.
        Parameters:
        message - The error message, may be null.
        lineNumber - The one-based index of the line containing the error or -1 if unknown.
        columnNumber - The one-based index of the column containing the error or -1 if unknown.
      • ModelParseException

        public ModelParseException​(java.lang.String message,
                                   int lineNumber,
                                   int columnNumber,
                                   java.lang.Throwable cause)
        Creates a new parser exception with the specified details.
        Parameters:
        message - The error message, may be null.
        lineNumber - The one-based index of the line containing the error or -1 if unknown.
        columnNumber - The one-based index of the column containing the error or -1 if unknown.
        cause - The nested cause of this error, may be null.
    • Method Detail

      • getLineNumber

        public int getLineNumber()
        Gets the one-based index of the line containing the error.
        Returns:
        The one-based index of the line containing the error or a non-positive value if unknown.
      • getColumnNumber

        public int getColumnNumber()
        Gets the one-based index of the column containing the error.
        Returns:
        The one-based index of the column containing the error or non-positive value if unknown.