Class MetadataParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.maven.artifact.repository.metadata.io.MetadataParseException
- All Implemented Interfaces:
Serializable
Signals a failure to parse the metadata due to invalid syntax (e.g. non well formed XML or unknown elements).
- Author:
- Benjamin Bentmann
- See Also:
-
Constructor Summary
ConstructorDescriptionMetadataParseException
(String message, int lineNumber, int columnNumber) Creates a new parser exception with the specified details.MetadataParseException
(String message, int lineNumber, int columnNumber, Throwable cause) Creates a new parser exception with the specified details. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the one-based index of the column containing the error.int
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
-
Constructor Details
-
MetadataParseException
Creates a new parser exception with the specified details.- Parameters:
message
- The error message, may benull
.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.
-
MetadataParseException
Creates a new parser exception with the specified details.- Parameters:
message
- The error message, may benull
.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 benull
.
-
-
Method Details
-
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.
-