org.hibernate.internal.util.xml
Class ErrorLogger

java.lang.Object
  extended by org.hibernate.internal.util.xml.ErrorLogger
All Implemented Interfaces:
Serializable, ErrorHandler

public class ErrorLogger
extends Object
implements ErrorHandler, Serializable

Implements an ErrorHandler that mainly just logs errors/warnings. However, it does track the errors it encounters and makes them available via getErrors().

See Also:
Serialized Form

Constructor Summary
ErrorLogger()
           
ErrorLogger(String file)
           
 
Method Summary
 void error(SAXParseException error)
          
 void fatalError(SAXParseException error)
          
 List<SAXParseException> getErrors()
           
 boolean hasErrors()
           
 void logErrors()
           
 void reset()
           
 void warning(SAXParseException warn)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorLogger

public ErrorLogger()

ErrorLogger

public ErrorLogger(String file)
Method Detail

error

public void error(SAXParseException error)

Specified by:
error in interface ErrorHandler

fatalError

public void fatalError(SAXParseException error)

Specified by:
fatalError in interface ErrorHandler

warning

public void warning(SAXParseException warn)

Specified by:
warning in interface ErrorHandler

getErrors

public List<SAXParseException> getErrors()
Returns:
returns a list of encountered xml parsing errors, or the empty list if there was no error

reset

public void reset()

hasErrors

public boolean hasErrors()

logErrors

public void logErrors()


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.