View Javadoc

1   package fr.in2p3.jsaga.helpers;
2   
3   import org.xml.sax.SAXException;
4   import org.xml.sax.SAXParseException;
5   import org.xml.sax.helpers.DefaultHandler;
6   
7   /* ***************************************************
8   * *** Centre de Calcul de l'IN2P3 - Lyon (France) ***
9   * ***             http://cc.in2p3.fr/             ***
10  * ***************************************************
11  * File:   XMLFileParserExceptionHandler
12  * Author: Sylvain Reynaud (sreynaud@in2p3.fr)
13  * Date:   16 avr. 2007
14  * ***************************************************
15  * Description:                                      */
16  /**
17   *
18   */
19  public class XMLFileParserExceptionHandler extends DefaultHandler {
20      private SAXParseException m_exception;
21  
22      public void error(SAXParseException exception) throws SAXException {
23          m_exception = exception;
24      }
25  
26      public void fatalError(SAXParseException exception) throws SAXException {
27          m_exception = exception;
28      }
29  
30      public void warning(SAXParseException exception) throws SAXException {
31          // ignore
32      }
33  
34      public SAXParseException getSAXParseException() {
35          return m_exception;
36      }
37  }