Class XMLParseException

All Implemented Interfaces:
Serializable

public class XMLParseException extends XNIException
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 Details

    • XMLParseException

      public XMLParseException(XMLLocator locator, String message)
      Constructs an XML parse exception with the specified locator and detail message.
      Parameters:
      locator - the XML locator providing position and source details, may be null
      message - the detail message
    • XMLParseException

      public XMLParseException(XMLLocator locator, String message, Exception exception)
      Constructs an XML parse exception with the specified locator, detail message, and cause.
      Parameters:
      locator - the XML locator providing position and source details, may be null
      message - the detail message
      exception - the wrapped cause exception
  • Method Details

    • getPublicId

      public String getPublicId()
      Returns the public identifier where the exception occurred.
      Returns:
      the public identifier, or null if none is available
    • getSystemId

      public String getSystemId()
      Returns the expanded system identifier where the exception occurred.
      Returns:
      the expanded system identifier, or null if none is available
    • getLiteralSystemId

      public String getLiteralSystemId()
      Returns the literal system identifier where the exception occurred.
      Returns:
      the literal system identifier, or null if none is available
    • getBaseSystemId

      public String getBaseSystemId()
      Returns the base system identifier where the exception occurred.
      Returns:
      the base system identifier, or null if none is available
    • getLineNumber

      public int getLineNumber()
      Returns the line number where the exception occurred.
      Returns:
      the one-based line number, or -1 if no line number is available
    • getColumnNumber

      public int getColumnNumber()
      Returns the column number where the exception occurred.
      Returns:
      the one-based column number, or -1 if no column number is available
    • getCharacterOffset

      public int getCharacterOffset()
      Returns the character offset where the exception occurred.
      Returns:
      the zero-based character offset, or -1 if no offset is available
    • toString

      public String toString()
      Overrides:
      toString in class Throwable