Class ErrorReceiver

  • All Implemented Interfaces:
    ErrorListener, com.sun.xml.bind.api.ErrorListener, ErrorHandler
    Direct Known Subclasses:
    ConsoleErrorReporter, ErrorReceiverFilter

    public abstract class ErrorReceiver
    extends Object
    implements ErrorHandler, ErrorListener
    Implemented by the driver of the compiler engine to handle errors found during the compiliation.

    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 this class throws 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.

    Author:
    Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com), Vivek Pandey