Identify bad responses coming back from the server, and throw a specific exception...
[frank.git] / prod / net / jaekl / qd / xml / ParseErrorHandler.java
1 // Copyright (C) 2014 Christian Jaekl
2
3 // Simple SAX parse error handler.
4 // Necessary to avoid printing [Fatal Error] messages to stdout when something goes wrong.
5
6 package net.jaekl.qd.xml;
7
8 import org.xml.sax.ErrorHandler;
9 import org.xml.sax.SAXException;
10 import org.xml.sax.SAXParseException;
11
12 public class ParseErrorHandler implements ErrorHandler {
13
14         @Override
15         public void error(SAXParseException saxpe) throws SAXException {
16                 throw saxpe;
17         }
18
19         @Override
20         public void fatalError(SAXParseException saxpe) throws SAXException {
21                 throw saxpe;
22         }
23
24         @Override
25         public void warning(SAXParseException saxpe) throws SAXException {
26                 throw saxpe;
27         }
28
29 }