|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.verisign.epp.util.TestErrorHandler
public class TestErrorHandler
Implementation of the SAX ErrorHandler
to report errors parsing
an XML document and to throw a SAXException so that the parsing stops on
any errors or warnings.
Constructor Summary | |
---|---|
TestErrorHandler()
Default TestErrorHandler constructor, which sets the
default output to System.err . |
|
TestErrorHandler(java.io.OutputStream aOut)
Allocate a TestErrorHandler with a destination
OutputStream for the error messages. |
Method Summary | |
---|---|
void |
error(org.xml.sax.SAXParseException aException)
Handle parser error. |
void |
fatalError(org.xml.sax.SAXParseException aException)
Handle parser fatal error. |
java.lang.String |
getErrorString(java.lang.String aLevel,
org.xml.sax.SAXParseException aException)
Format a String message that includes the level of the
error, the system id, the line number of the error, the column
number of the error, and the error message. |
void |
warning(org.xml.sax.SAXParseException aException)
Handle parser warning. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestErrorHandler()
TestErrorHandler
constructor, which sets the
default output to System.err
.
public TestErrorHandler(java.io.OutputStream aOut)
TestErrorHandler
with a destination
OutputStream
for the error messages.
aOut
- Stream to write error message toMethod Detail |
---|
public void error(org.xml.sax.SAXParseException aException) throws org.xml.sax.SAXException
System.err
or the output stream
specified in TestErrorHandler(OutputStream)
. A
SAXException
is thrown to ensure that the processing of
the XML document stops.
error
in interface org.xml.sax.ErrorHandler
aException
- parser error exception
org.xml.sax.SAXException
- Exception containing a formatted message of the
errorpublic void warning(org.xml.sax.SAXParseException aException) throws org.xml.sax.SAXException
System.err
or the output
stream specified in TestErrorHandler(OutputStream)
. A
SAXException is thrown to ensure that the processing of the XML
document stops.
warning
in interface org.xml.sax.ErrorHandler
aException
- parser warning exception
org.xml.sax.SAXException
- Exception containing a formatted message of the
warningpublic void fatalError(org.xml.sax.SAXParseException aException) throws org.xml.sax.SAXException
System.err
or the output
stream specified in TestErrorHandler(OutputStream)
. A
SAXException
is thrown to ensure that the processing of
the XML document stops.
fatalError
in interface org.xml.sax.ErrorHandler
aException
- parser fatal error exception
org.xml.sax.SAXException
- Exception containing a formatted message of the
fatal errorpublic java.lang.String getErrorString(java.lang.String aLevel, org.xml.sax.SAXParseException aException)
String
message that includes the level of the
error, the system id, the line number of the error, the column
number of the error, and the error message.
aLevel
- Level of the error ("Warning", "Error", or "Fatal Error").aException
- parser error exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |