com.sun.tools.xjc
public abstract class ErrorReceiver extends Object implements ErrorHandler, ErrorListener
This class implements ErrorHandler so it can be passed to anywhere where ErrorHandler is expected.
However, to make the error handling easy (and make it work with visitor patterns nicely), none of the methods on thi class throws org.xml.sax.SAXException. Instead, when the compilation needs to be aborted, it throws AbortException, which is unchecked.
This also implements the externally visible ErrorListener so that we can reuse our internal implementation for testing and such.
Method Summary | |
---|---|
void | debug(String msg)
Reports a debug message to users.
|
void | error(Locator loc, String msg) |
void | error(Locator loc, String msg, Exception e) |
void | error(String msg, Exception e) |
void | error(Exception e) |
abstract void | error(SAXParseException exception) |
abstract void | fatalError(SAXParseException exception) |
protected String | getLocationString(SAXParseException e)
Returns the human readable string representation of the
org.xml.sax.Locator part of the specified
SAXParseException.
|
abstract void | info(SAXParseException exception)
Reports verbose messages to users.
|
void | pollAbort()
This method will be invoked periodically to allow AbortException
to be thrown, especially when this is driven by some kind of GUI. |
void | warning(Locator loc, String msg) |
abstract void | warning(SAXParseException exception) |
See Also: info
Parameters: loc can be null if the location is unknown
Returns: non-null valid object.
Parameters: loc can be null if the location is unknown