public class XMLException
extends java.lang.Exception
Modifier and Type | Field and Description |
---|---|
static int |
ERROR
Code for non-fatal error
|
static int |
FATAL_ERROR
Code for fatal error
|
static int |
WARNING
Code for warning
|
Constructor and Description |
---|
XMLException(java.lang.String mesg, java.lang.String pubId, java.lang.String sysId, int line, int col, int type) |
XMLException(java.lang.String mesg, java.lang.Throwable ex) |
XMLException(XMLError err, java.lang.Exception e) |
XMLException(XMLError err, int firsterr) |
XMLException(XMLError err, int firsterr, java.lang.Exception e) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
formatErrorMessage(int i)
Get the error message at specified index
|
java.lang.Throwable |
getCause()
Get the cause exception
|
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.
|
java.lang.Throwable |
initCause(java.lang.Throwable ex)
Set the underlying exception (if exists) This overrides the super.initCause (since JDK1.4)
|
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.
|
public static final int ERROR
public static final int FATAL_ERROR
public static final int WARNING
public XMLException(java.lang.String mesg, java.lang.Throwable ex)
public XMLException(java.lang.String mesg, java.lang.String pubId, java.lang.String sysId, int line, int col, int type)
public XMLException(XMLError err, int firsterr)
public XMLException(XMLError err, int firsterr, java.lang.Exception e)
public XMLException(XMLError err, java.lang.Exception e)
public int getNumMessages()
public java.lang.String getMessage(int i)
public java.lang.String formatErrorMessage(int i)
public int getLineNumber(int i)
public int getColumnNumber(int i)
public java.lang.String getSystemId(int i)
public java.lang.String getPublicId(int i)
public java.lang.Exception getException(int i)
public java.lang.Throwable getCause()
getCause
in class java.lang.Throwable
public int getMessageType(int i)
public void printStackTrace()
Throwable
and its backtrace to the standard error stream.printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream s)
Throwable
and its backtrace to the specified print stream.printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter s)
Throwable
and its backtrace to the specified print writer.printStackTrace
in class java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Throwable
public void setException(java.lang.Exception ex)
The
- exceptionpublic java.lang.Throwable initCause(java.lang.Throwable ex)
initCause
in class java.lang.Throwable
The
- Throwable cause
Returns:
this
getXMLError
public XMLError getXMLError()
Get XMLError object inside XMLException.
Returns:
the XMLError object.
Copyright © 2003, 2016, Oracle and/or its affiliates. All rights reserved.