Example #1
0
 /**
  * Notifies the registered {@link ErrorHandler SAX error handler} (if any) of an input processing
  * error. The error handler can choose to absorb the error and let the processing continue.
  *
  * @param exception <code>JDOMException</code> containing the error information; will be wrapped
  *     in a {@link SAXParseException} when reported to the SAX error handler.
  * @throws JDOMException if no error handler has been registered or if the error handler fired a
  *     {@link SAXException}.
  */
 private void handleError(JDOMException exception) throws JDOMException {
   if (errorHandler != null) {
     try {
       errorHandler.error(new SAXParseException(exception.getMessage(), null, exception));
     } catch (SAXException se) {
       if (se.getException() instanceof JDOMException) {
         throw (JDOMException) (se.getException());
       }
       throw new JDOMException(se.getMessage(), se);
     }
   } else {
     throw exception;
   }
 }
Example #2
0
 /** @see org.xml.sax.helpers.DefaultHandler#warning(org.xml.sax.SAXParseException) */
 public void warning(SAXParseException e) throws SAXException {
   if (delegate != null) delegate.warning(e);
   else super.warning(e);
 }
Example #3
0
 /** @see org.xml.sax.helpers.DefaultHandler#error(org.xml.sax.SAXParseException) */
 public void error(SAXParseException e) throws SAXException {
   if (delegate != null) delegate.error(e);
   else super.error(e);
 }