com.thaiopensource.xml.sax
Class ErrorHandlerImpl

java.lang.Object
  extended by com.thaiopensource.xml.sax.ErrorHandlerImpl
All Implemented Interfaces:
ErrorHandler
Direct Known Subclasses:
JingTask.LogErrorHandler

public class ErrorHandlerImpl
extends Object
implements ErrorHandler


Field Summary
private  ResourceBundle bundle
           
private  String bundleName
           
private  PrintWriter err
           
 
Constructor Summary
ErrorHandlerImpl()
           
ErrorHandlerImpl(OutputStream os)
           
ErrorHandlerImpl(Writer w)
           
 
Method Summary
 void close()
           
 void error(SAXParseException e)
           
 void fatalError(SAXParseException e)
           
private  String format(String key, Object[] args)
           
private  String formatLocation(SAXParseException e)
           
private  String formatMessage(SAXException se)
           
private  String formatMessage(Throwable e)
           
private  String getString(String key)
           
 void print(String message)
           
 void printException(Throwable e)
           
 void warning(SAXParseException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

err

private final PrintWriter err

bundleName

private final String bundleName
See Also:
Constant Field Values

bundle

private ResourceBundle bundle
Constructor Detail

ErrorHandlerImpl

public ErrorHandlerImpl()

ErrorHandlerImpl

public ErrorHandlerImpl(OutputStream os)

ErrorHandlerImpl

public ErrorHandlerImpl(Writer w)
Method Detail

close

public void close()

getString

private String getString(String key)

format

private String format(String key,
                      Object[] args)

warning

public void warning(SAXParseException e)
             throws SAXParseException
Specified by:
warning in interface ErrorHandler
Throws:
SAXParseException

error

public void error(SAXParseException e)
Specified by:
error in interface ErrorHandler

fatalError

public void fatalError(SAXParseException e)
                throws SAXParseException
Specified by:
fatalError in interface ErrorHandler
Throws:
SAXParseException

printException

public void printException(Throwable e)

print

public void print(String message)

formatLocation

private String formatLocation(SAXParseException e)

formatMessage

private String formatMessage(SAXException se)

formatMessage

private String formatMessage(Throwable e)