public class XMLError
extends java.lang.Object
Constructor and Description |
---|
XMLError()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
error(int id, int type, java.lang.String msg)
Adds a new error to the vector
|
void |
error(int id, int type, java.lang.String[] p)
Adds a new error to the vector
|
void |
error0(int id, int type)
Adds a new error to the vector
|
void |
error1(int id, int type, java.lang.String p1)
Adds a new error to the vector
|
void |
error2(int id, int type, java.lang.String p1, java.lang.String p2)
Adds a new error to the vector
|
void |
error3(int id, int type, java.lang.String p1, java.lang.String p2, java.lang.String p3)
Adds a new error to the vector
|
void |
flushErrorStream()
Flush all the error to the ouput stream output stream defaults or to error handler
|
java.lang.String |
formatErrorMesg(int 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 |
getFirstError() |
int |
getLineNumber(int i)
Get the line number of error at specified index
|
Locator |
getLocator()
Return the registered locator
|
java.lang.String |
getMessage(int i)
Get the error message at specified index
|
java.lang.String |
getMessage(int errId, java.lang.String[] params)
Get error message with more than 5 arguments
|
java.lang.String |
getMessage0(int errId)
Get error message with no arguments
|
java.lang.String |
getMessage1(int errId, java.lang.String a1)
Get error message with 1 arguments
|
java.lang.String |
getMessage2(int errId, java.lang.String a1, java.lang.String a2)
Get error message with 2 arguments
|
java.lang.String |
getMessage3(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3)
Get error message with 3 arguments
|
java.lang.String |
getMessage4(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4)
Get error message with 4 arguments
|
java.lang.String |
getMessage5(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4, java.lang.String a5)
Get error message with 5 arguments
|
int |
getMessageId(int i)
Get the ID of the error message at specified index
|
int |
getMessageType(int i)
Get the type of the error message at specified index
|
int |
getNumExceptions()
Return the total number of fatal errors found during parsing
|
int |
getNumFatalMessages()
Return the total number of fatal errors found during parsing
|
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
|
void |
printErrorListener()
Flush all the JAXP 1.1 errors to the ErrorListener If no ErrorListener was set, default to System.err
|
void |
reset()
Reset the error class
|
void |
setErrorStream(java.io.OutputStream out)
Register a output stream
|
void |
setErrorStream(java.io.OutputStream out, java.lang.String enc)
Register a output stream
|
void |
setErrorStream(java.io.PrintWriter out)
Register a output stream
|
void |
setException(java.lang.Exception exp)
Register a exception
|
void |
setLocale(java.util.Locale locale)
Register a locale
|
void |
setLocator(Locator locator)
Register a locator
|
void |
showWarnings(boolean flag)
Turn reporting warning on/off
|
public void reset()
public void setErrorStream(java.io.OutputStream out)
out
- - OutputStream to ouput the error/warningspublic void setErrorStream(java.io.OutputStream out, java.lang.String enc) throws java.io.IOException
out
- - OutputStream to ouput the error/warningsenc
- - Encoding of the outputstreamjava.io.IOException
- - if an error occurs initializing the outputstreampublic void setErrorStream(java.io.PrintWriter out)
out
- - PrintWriter to ouput the error/warningspublic void showWarnings(boolean flag)
flag
- - controls reporting of warningspublic void setLocale(java.util.Locale locale)
locale
- - locale for error reportingpublic void setLocator(Locator locator)
locator
- - locater to get lin/col/sysid/pubid infopublic void setException(java.lang.Exception exp)
exp
- - last exception occuredpublic Locator getLocator()
public int getFirstError()
public int getNumMessages()
public final int getNumFatalMessages()
public final int getNumExceptions()
public java.lang.String getMessage(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 int getMessageId(int i)
public int getMessageType(int i)
public void error(int id, int type, java.lang.String msg)
id
- - id of the error messagemesg
- - error message (without paramters)type
- - type of the errorpublic void error0(int id, int type)
id
- - id of the error messagetype
- - type of the errorpublic void error1(int id, int type, java.lang.String p1)
id
- - id of the error messagetype
- - type of the errorp1
- - paramter 1public void error2(int id, int type, java.lang.String p1, java.lang.String p2)
id
- - id of the error messagetype
- - type of the errorp1
- - paramter 1p2
- - paramter 2public void error3(int id, int type, java.lang.String p1, java.lang.String p2, java.lang.String p3)
id
- - id of the error messagetype
- - type of the errorp1
- - paramter 1p2
- - paramter 2p3
- - paramter 3public void error(int id, int type, java.lang.String[] p)
id
- - id of the error messagetype
- - type of the errorp
- - paramter arraypublic void flushErrorStream() throws java.io.IOException
java.io.IOException
public void printErrorListener() throws java.io.IOException
java.io.IOException
public java.lang.String getMessage0(int errId)
public java.lang.String getMessage1(int errId, java.lang.String a1)
public java.lang.String getMessage2(int errId, java.lang.String a1, java.lang.String a2)
public java.lang.String getMessage3(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3)
public java.lang.String getMessage4(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4)
public java.lang.String getMessage5(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4, java.lang.String a5)
public java.lang.String getMessage(int errId, java.lang.String[] params)
public java.lang.String formatErrorMesg(int index)