Module org.htmlunit.cyberneko
Class XMLParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.htmlunit.cyberneko.xerces.xni.XNIException
org.htmlunit.cyberneko.xerces.xni.parser.XMLParseException
- All Implemented Interfaces:
Serializable
A parsing exception that captures the exact location within an XML document
(or its parsed entities) where the error occurred.
- Author:
- Andy Clark, IBM, Ronald Brill
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXMLParseException(XMLLocator locator, String message) Constructs an XML parse exception with the specified locator and detail message.XMLParseException(XMLLocator locator, String message, Exception exception) Constructs an XML parse exception with the specified locator, detail message, and cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the base system identifier where the exception occurred.intReturns the character offset where the exception occurred.intReturns the column number where the exception occurred.intReturns the line number where the exception occurred.Returns the literal system identifier where the exception occurred.Returns the public identifier where the exception occurred.Returns the expanded system identifier where the exception occurred.toString()Methods inherited from class org.htmlunit.cyberneko.xerces.xni.XNIException
getExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
XMLParseException
Constructs an XML parse exception with the specified locator and detail message.- Parameters:
locator- the XML locator providing position and source details, may benullmessage- the detail message
-
XMLParseException
Constructs an XML parse exception with the specified locator, detail message, and cause.- Parameters:
locator- the XML locator providing position and source details, may benullmessage- the detail messageexception- the wrapped cause exception
-
-
Method Details
-
getPublicId
Returns the public identifier where the exception occurred.- Returns:
- the public identifier, or
nullif none is available
-
getSystemId
Returns the expanded system identifier where the exception occurred.- Returns:
- the expanded system identifier, or
nullif none is available
-
getLiteralSystemId
Returns the literal system identifier where the exception occurred.- Returns:
- the literal system identifier, or
nullif none is available
-
getBaseSystemId
Returns the base system identifier where the exception occurred.- Returns:
- the base system identifier, or
nullif none is available
-
getLineNumber
public int getLineNumber()Returns the line number where the exception occurred.- Returns:
- the one-based line number, or
-1if no line number is available
-
getColumnNumber
public int getColumnNumber()Returns the column number where the exception occurred.- Returns:
- the one-based column number, or
-1if no column number is available
-
getCharacterOffset
public int getCharacterOffset()Returns the character offset where the exception occurred.- Returns:
- the zero-based character offset, or
-1if no offset is available
-
toString
-