File: SimpleErrorHandler.java

package info (click to toggle)
spview 2.0.0~beta2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,652 kB
  • sloc: java: 8,449; xml: 29; makefile: 10; sh: 3
file content (19 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;

public class SimpleErrorHandler implements ErrorHandler {
    public void warning(SAXParseException e) throws SAXException {
        System.out.println("WARNING : " + e.getMessage());
    }

    public void error(SAXParseException e) throws SAXException {
        System.out.println("ERROR : " + e.getMessage());
        throw e;
    }

    public void fatalError(SAXParseException e) throws SAXException {
        System.out.println("FATAL ERROR : " + e.getMessage());
        throw e;
    }
}