Class XMLParseException
Thrown by an XMLParser refusing malformed input (see
XMLParser.setRejectMalformed(boolean))
when the document is not well formed, nests deeper than
XMLParser.setMaxDepth(int), or references an entity the parser does not
define.
It extends IllegalArgumentException, which is what the parser has always
thrown when a ParserCallback asks it to stop, so code that catches that
keeps working.
-
Constructor Summary
ConstructorsConstructorDescriptionXMLParseException(String message) Creates an exception with no position.XMLParseException(String message, int line, int column) Creates an exception at a position, which the message names as "line 3, column 7: ...". -
Method Summary
Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
XMLParseException
Creates an exception with no position.
Parameters
message: what is wrong
-
XMLParseException
Creates an exception at a position, which the message names as "line 3, column 7: ...".
Parameters
-
message: what is wrong -
line: the line of the offending character, from 1 -
column: its column, from 1 (0 before the first character of a line)
-
-
-
Method Details
-
getLine
public int getLine()The line of the error, from 1, or -1 when it has no position.
Returns
the line
-
getColumn
public int getColumn()The column of the error, from 1, or -1 when it has no position.
Returns
the column
-