org.ow2.util.xml
Class DefaultErrorHandler

java.lang.Object
  extended by org.ow2.util.xml.DefaultErrorHandler
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class DefaultErrorHandler
extends java.lang.Object
implements org.xml.sax.ErrorHandler

Define an error handler which throw an exception as Digester not (only print stack trace). This handler is use for throwing/catching in a convenient way the xml parsing error of xml file.

Author:
Florent Benoit

Constructor Summary
DefaultErrorHandler()
           
 
Method Summary
 void error(org.xml.sax.SAXParseException exception)
          Receive notification of a recoverable error.
 void fatalError(org.xml.sax.SAXParseException exception)
          Receive notification of a non-recoverable error.
 void warning(org.xml.sax.SAXParseException exception)
          Receive notification of a warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultErrorHandler

public DefaultErrorHandler()
Method Detail

warning

public void warning(org.xml.sax.SAXParseException exception)
             throws org.xml.sax.SAXException
Receive notification of a warning.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Parameters:
exception - exception to throw
Throws:
org.xml.sax.SAXException - if an error is thrown

error

public void error(org.xml.sax.SAXParseException exception)
           throws org.xml.sax.SAXException
Receive notification of a recoverable error.

Specified by:
error in interface org.xml.sax.ErrorHandler
Parameters:
exception - exception to throw
Throws:
org.xml.sax.SAXException - if an error is thrown

fatalError

public void fatalError(org.xml.sax.SAXParseException exception)
                throws org.xml.sax.SAXException
Receive notification of a non-recoverable error.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Parameters:
exception - exception to throw
Throws:
org.xml.sax.SAXException - if an error is thrown


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.