Oracle® Application Server
XML Java API Reference
10g Release 3 (10.1.3)

B28238-01


oracle.xml.util
Class XMLException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byoracle.xml.util.XMLException

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
XSLException

public class XMLException
extends java.lang.Exception

Indicates that a parsing exception occurred while processing an XML document

See Also:
Serialized Form

Field Summary
static int ERROR
Code for non-fatal error
static int FATAL_ERROR
Code for fatal error
static int WARNING
Code for warning

Constructor Summary
XMLException(java.lang.String mesg, java.lang.String pubId, java.lang.String sysId, int line, int col, int type)
XMLException(XMLError err, java.lang.Exception e)
XMLException(XMLError err, int firsterr)
XMLException(XMLError err, int firsterr, java.lang.Exception e)

Method Summary
java.lang.String formatErrorMessage(int i)
Get the error message at specified index
int getColumnNumber(int i)
Get the column number of error at specified index
java.lang.Exception getException(int i)
Get the exception (if exists) that occured in error at specified index
int getLineNumber(int i)
Get the line number of error at specified index
java.lang.String getMessage(int i)
Get the error message at specified index
int getMessageType(int i)
Get the type of the error message at specified index
int getNumMessages()
Return the total number of errors/warnings found during parsing
java.lang.String getPublicId(int i)
Get the public ID of input when error at specified index occured
java.lang.String getSystemId(int i)
Get the system ID of input when error at specified index occured
XMLError getXMLError()
Get XMLError object inside XMLException.
void printStackTrace()
Prints this Throwable and its backtrace to the standard error stream.
void printStackTrace(java.io.PrintStream s)
Prints this Throwable and its backtrace to the specified print stream.
void printStackTrace(java.io.PrintWriter s)
Prints this Throwable and its backtrace to the specified print writer.
void setException(java.lang.Exception ex)
Set the underlying exception (if exists)
java.lang.String toString()
Override toString to pick up any embedded exception.

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ERROR

public static final int ERROR
Code for non-fatal error
See Also:
Constant Field Values

FATAL_ERROR

public static final int FATAL_ERROR
Code for fatal error
See Also:
Constant Field Values

WARNING

public static final int WARNING
Code for warning
See Also:
Constant Field Values

Constructor Detail

XMLException

public XMLException(java.lang.String mesg,
                    java.lang.String pubId,
                    java.lang.String sysId,
                    int line,
                    int col,
                    int type)

XMLException

public XMLException(XMLError err,
                    int firsterr)

XMLException

public XMLException(XMLError err,
                    int firsterr,
                    java.lang.Exception e)

XMLException

public XMLException(XMLError err,
                    java.lang.Exception e)

Method Detail

getNumMessages

public int getNumMessages()
Return the total number of errors/warnings found during parsing
Returns:
The number of errors/warnings

getMessage

public java.lang.String getMessage(int i)
Get the error message at specified index
Returns:
The error message

formatErrorMessage

public java.lang.String formatErrorMessage(int i)
Get the error message at specified index
Returns:
The error message

getLineNumber

public int getLineNumber(int i)
Get the line number of error at specified index
Returns:
The line number

getColumnNumber

public int getColumnNumber(int i)
Get the column number of error at specified index
Returns:
The column number

getSystemId

public java.lang.String getSystemId(int i)
Get the system ID of input when error at specified index occured
Returns:
The system ID

getPublicId

public java.lang.String getPublicId(int i)
Get the public ID of input when error at specified index occured
Returns:
The public ID

getException

public java.lang.Exception getException(int i)
Get the exception (if exists) that occured in error at specified index
Returns:
The exception

getMessageType

public int getMessageType(int i)
Get the type of the error message at specified index
Returns:
The error message type

printStackTrace

public void printStackTrace()
Prints this Throwable and its backtrace to the standard error stream.

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints this Throwable and its backtrace to the specified print stream.

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints this Throwable and its backtrace to the specified print writer.

toString

public java.lang.String toString()
Override toString to pick up any embedded exception.
Returns:
A string representation of this exception.

setException

public void setException(java.lang.Exception ex)
Set the underlying exception (if exists)

getXMLError

public XMLError getXMLError()
Get XMLError object inside XMLException.
Returns:
the XMLError object.

Oracle® Application Server
XML Java API Reference
10g Release 3 (10.1.3)

B28238-01


Copyright © 2003, 2006, Oracle. All rights reserved.