|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception com.microstar.xml.XmlException
public class XmlException
Convenience exception class for reporting XML parsing errors.
This is an exception class that you can use to encapsulate all
of the information from Ælfred's error
callback.
This is not necessary for routine use of Ælfred, but it
is used by the optional HandlerBase
class.
Note that the core Ælfred classes do not use this exception.
JDK1.4 supports exception chaining. We are implementing a version of exception chaining here ourselves so that we can use JVMs earlier than JDK1.4.
In this implementation, we have the following differences from the JDK1.4 exception chaining implementation:
XmlHandler.error(java.lang.String, java.lang.String, int, int)
,
HandlerBase
,
Serialized FormField Summary | |
---|---|
private java.lang.Throwable |
_cause
|
private int |
_column
|
private int |
_line
|
private java.lang.String |
_message
|
private java.lang.String |
_systemId
|
Constructor Summary | |
---|---|
XmlException(java.lang.String message,
java.lang.String systemId)
Construct a new XML parsing exception. |
|
XmlException(java.lang.String message,
java.lang.String systemId,
int line,
int column)
Construct a new XML parsing exception. |
|
XmlException(java.lang.String message,
java.lang.String systemId,
int line,
int column,
java.lang.Throwable cause)
Construct a new XML parsing exception. |
Method Summary | |
---|---|
java.lang.Throwable |
getCause()
Get the cause of this exception. |
int |
getColumn()
Get the column number containing the error. |
int |
getLine()
Get the line number containing the error. |
java.lang.String |
getMessage()
Get the error message from the parser. |
java.lang.String |
getSystemId()
Get the URI of the entity containing the error. |
void |
printStackTrace()
Print the following to stderr: this exception, its stack trace and if the cause exception is known, print the cause exception and the cause stacktrace. |
void |
printStackTrace(java.io.PrintStream printStream)
Print this exception, its stack trace and if the cause exception is known, print the cause exception and the cause stacktrace. |
void |
printStackTrace(java.io.PrintWriter printWriter)
Print this exception, its stack trace and if the cause exception is known, print the cause exception and the cause stacktrace. |
static java.lang.String |
stackTraceToString(java.lang.Throwable throwable)
Return the stack trace of the given argument as a String. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String _message
private java.lang.Throwable _cause
private java.lang.String _systemId
private int _line
private int _column
Constructor Detail |
---|
public XmlException(java.lang.String message, java.lang.String systemId)
message
- The error message from the parser.systemId
- The URI of the entity containing the error.public XmlException(java.lang.String message, java.lang.String systemId, int line, int column)
message
- The error message from the parser.systemId
- The URI of the entity containing the error.line
- The line number where the error appeared.column
- The column number where the error appeared.public XmlException(java.lang.String message, java.lang.String systemId, int line, int column, java.lang.Throwable cause)
message
- The error message from the parser.systemId
- The URI of the entity containing the error.line
- The line number where the error appeared.column
- The column number where the error appeared.cause
- The cause of this exception, if anyMethod Detail |
---|
public java.lang.Throwable getCause()
getCause
in class java.lang.Throwable
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getSystemId()
public int getLine()
public int getColumn()
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream printStream)
printStackTrace
in class java.lang.Throwable
printStream
- The PrintStream to write to.public void printStackTrace(java.io.PrintWriter printWriter)
printStackTrace
in class java.lang.Throwable
printWriter
- The PrintWriter to write to.public static java.lang.String stackTraceToString(java.lang.Throwable throwable)
throwable
- A throwable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |