de.pangaea.metadataportal.utils
Class LoggingErrorListener

java.lang.Object
  extended by de.pangaea.metadataportal.utils.LoggingErrorListener
All Implemented Interfaces:
ErrorListener

public final class LoggingErrorListener
extends Object
implements ErrorListener

Helper class to correctly log TransformerExceptions with Commons Logging.

Author:
Uwe Schindler

Constructor Summary
LoggingErrorListener(Class c)
          A error listener using the supplied class name as log target.
LoggingErrorListener(org.apache.commons.logging.Log log)
          A error listener using the supplied Commons Logging instance as log target.
 
Method Summary
 void error(TransformerException e)
          Just throws e.
 void fatalError(TransformerException e)
          Just throws e.
 void warning(TransformerException e)
          Logs message and location with WARN method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingErrorListener

public LoggingErrorListener(org.apache.commons.logging.Log log)
A error listener using the supplied Commons Logging instance as log target.


LoggingErrorListener

public LoggingErrorListener(Class c)
A error listener using the supplied class name as log target.

Method Detail

error

public void error(TransformerException e)
           throws TransformerException
Just throws e.

Specified by:
error in interface ErrorListener
Throws:
TransformerException

fatalError

public void fatalError(TransformerException e)
                throws TransformerException
Just throws e.

Specified by:
fatalError in interface ErrorListener
Throws:
TransformerException

warning

public void warning(TransformerException e)
             throws TransformerException
Logs message and location with WARN method.

Specified by:
warning in interface ErrorListener
Throws:
TransformerException


Copyright ©2007-2009 panFMP Developers c/o Uwe Schindler