01: package hero.xpdl;
02:
03: import org.xml.sax.ErrorHandler;
04: import org.xml.sax.SAXException;
05: import org.xml.sax.SAXParseException;
06:
07: /**
08: * Define an error handler which throw an exception
09: * as Digester not (only print stack trace).
10: * Security service use this handler for throwing/catching in
11: * a convenient way the xml parsing error of jonas-realm.xml file.
12: */
13: public class JErrorHandler implements ErrorHandler {
14:
15: /**
16: * Receive notification of a warning.
17: * @param exception exception to throw
18: * @throws SAXException if an error is thrown
19: */
20: public void warning(SAXParseException exception)
21: throws SAXException {
22:
23: }
24:
25: /**
26: * Receive notification of a recoverable error.
27: * @param exception exception to throw
28: * @throws SAXException if an error is thrown
29: */
30: public void error(SAXParseException exception) throws SAXException {
31: throw exception;
32: }
33:
34: /**
35: * Receive notification of a non-recoverable error.
36: * @param exception exception to throw
37: * @throws SAXException if an error is thrown
38: */
39: public void fatalError(SAXParseException exception)
40: throws SAXException {
41: throw exception;
42: }
43: }
|