|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.joost.stx.ErrorHandlerImpl
public final class ErrorHandlerImpl
Class for receiving notifications of warnings and errors and for passing them to a registered ErrorListener object.
Field Summary | |
---|---|
private boolean |
configurationFlag
if set to true this object creates
TransformerConfigurationExceptions |
ErrorListener |
errorListener
Optional ErrorListener object |
Constructor Summary | |
---|---|
ErrorHandlerImpl()
Default constructor, no ErrorListener registered |
|
ErrorHandlerImpl(boolean configurationFlag)
Constructs an ErrorHandlerImpl, no ErrorListener registered |
|
ErrorHandlerImpl(ErrorListener el)
Constructs an ErrorHandlerImpl and registers an ErrorListener. |
|
ErrorHandlerImpl(ErrorListener el,
boolean configurationFlag)
Constructs an ErrorHandlerImpl and registers an ErrorListener. |
Method Summary | |
---|---|
void |
error(SAXParseException pe)
Receive a notification of a recoverable error from the parser. |
void |
error(String msg,
Locator loc,
Throwable cause)
Reports a recoverable error to a registered errorListener . |
void |
error(String msg,
String pubId,
String sysId,
int lineNo,
int colNo)
Calls error(String, String, String, int, int, Throwable) with
the cause parameter set to null . |
void |
error(String msg,
String pubId,
String sysId,
int lineNo,
int colNo,
Throwable cause)
Reports a recoverable error to a registered errorListener . |
void |
error(TransformerException te)
Reports a recoverable error to a registered errorListener . |
void |
fatalError(SAXParseException pe)
Receive a notification of a non-recoverable error from the parser. |
void |
fatalError(String msg,
Locator loc,
Throwable cause)
Reports a non-recoverable error to a registered errorListener . |
void |
fatalError(String msg,
String pubId,
String sysId,
int lineNo,
int colNo)
Calls fatalError(String, String, String, int, int, Throwable)
with the cause parameter set to null . |
void |
fatalError(String msg,
String pubId,
String sysId,
int lineNo,
int colNo,
Throwable cause)
Reports a non-recoverable error to a registered errorListener |
void |
fatalError(TransformerException te)
Reports a non-recoverable error to a registered errorListener |
private TransformerException |
newException(String msg,
SourceLocator sl,
Throwable cause)
Creates an Exception dependent from the value of configurationFlag |
void |
warning(SAXParseException pe)
Receive a notification of a warning from the parser. |
void |
warning(String msg,
Locator loc,
Throwable cause)
Reports a warning to a registered errorListener . |
void |
warning(String msg,
String pubId,
String sysId,
int lineNo,
int colNo)
Calls warning(String, String, String, int, int, Throwable)
with the cause parameter set to null . |
void |
warning(String msg,
String pubId,
String sysId,
int lineNo,
int colNo,
Throwable cause)
Reports a warning to a registered errorListener . |
void |
warning(TransformerException te)
Reports a warning to a registered errorListener . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ErrorListener errorListener
ErrorListener
object
private boolean configurationFlag
true
this object creates
TransformerConfigurationExceptions
Constructor Detail |
---|
public ErrorHandlerImpl()
public ErrorHandlerImpl(ErrorListener el)
el
- the ErrorLister for this objectpublic ErrorHandlerImpl(boolean configurationFlag)
configurationFlag
- if set to true
then this
handler constructs
TransformerConfigurationException
s rather than
TransformerException
spublic ErrorHandlerImpl(ErrorListener el, boolean configurationFlag)
el
- the ErrorLister for this objectconfigurationFlag
- if set to true
then this
handler constructs
TransformerConfigurationException
s rather than
TransformerException
sMethod Detail |
---|
private TransformerException newException(String msg, SourceLocator sl, Throwable cause)
configurationFlag
public void warning(String msg, Locator loc, Throwable cause) throws SAXException
errorListener
.
Does nothing if there's no such listener object.
msg
- the message of this warningloc
- a SAX Locator
objectcause
- an optional Throwable
that caused this warning
SAXException
- wrapping a TransformerException
public void warning(String msg, String pubId, String sysId, int lineNo, int colNo, Throwable cause) throws SAXException
errorListener
.
Does nothing if there's no such listener object.
msg
- the message of this warningpubId
- the public identifier of the sourcesysId
- the system identifier of the sourcelineNo
- the line number in the source which causes the warningcolNo
- the column number in the source which causes the warningcause
- an optional Throwable
that caused this warning
SAXException
- wrapping a TransformerException
public void warning(String msg, String pubId, String sysId, int lineNo, int colNo) throws SAXException
warning(String, String, String, int, int, Throwable)
with the cause
parameter set to null
.
SAXException
public void warning(TransformerException te) throws SAXException
errorListener
.
Does nothing if there's no such listener object.
te
- the warning encapsulated in a TransformerException
SAXException
- wrapping a TransformerException
public void warning(SAXParseException pe) throws SAXException
errorListener
was registered, the provided parameter
SAXParseException
will be passed to this object wrapped
in a TransformerException
warning
in interface ErrorHandler
SAXException
- wrapping TransformerException
public void error(String msg, Locator loc, Throwable cause) throws SAXException
errorListener
.
msg
- the message of this errorloc
- a SAX Locator
objectcause
- an optional Throwable
that caused this error
SAXException
- wrapping a TransformerException
public void error(String msg, String pubId, String sysId, int lineNo, int colNo, Throwable cause) throws SAXException
errorListener
.
msg
- the message of this errorpubId
- the public identifier of the sourcesysId
- the system identifier of the sourcelineNo
- the line number in the source which causes the errorcolNo
- the column number in the source which causes the errorcause
- an optional Throwable
that caused this error
SAXException
- wrapping a TransformerException
public void error(String msg, String pubId, String sysId, int lineNo, int colNo) throws SAXException
error(String, String, String, int, int, Throwable)
with
the cause
parameter set to null
.
SAXException
public void error(TransformerException te) throws SAXException
errorListener
.
te
- the error encapsulated in a TransformerException
SAXException
- wrapping a TransformerException
public void error(SAXParseException pe) throws SAXException
errorListener
was registered, the provided parameter
SAXParseException
will be passed to this object wrapped
in a TransformerException
error
in interface ErrorHandler
SAXException
- wrapping a TransformerException
public void fatalError(String msg, Locator loc, Throwable cause) throws SAXException
errorListener
.
msg
- the message of this errorloc
- a SAX Locator
objectcause
- an optional Throwable
that caused this error
SAXException
- wrapping a TransformerException
public void fatalError(String msg, String pubId, String sysId, int lineNo, int colNo, Throwable cause) throws SAXException
errorListener
msg
- the message of this errorpubId
- the public identifier of the sourcesysId
- the system identifier of the sourcelineNo
- the line number in the source which causes the errorcolNo
- the column number in the source which causes the errorcause
- an optional Throwable
that caused this error
SAXException
- wrapping a TransformerException
public void fatalError(String msg, String pubId, String sysId, int lineNo, int colNo) throws SAXException
fatalError(String, String, String, int, int, Throwable)
with the cause
parameter set to null
.
SAXException
public void fatalError(TransformerException te) throws SAXException
errorListener
te
- the error encapsulated in a TransformerException
SAXException
- wrapping a TransformerException
public void fatalError(SAXParseException pe) throws SAXException
errorListener
was registered, the provided parameter
SAXParseException
will be passed to this object wrapped
in a TransformerException
fatalError
in interface ErrorHandler
SAXException
- wrapping a TransformerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |