Forward Computing and Control Pty. Ltd.
WebStringTemplate V1.5.0

2004/1/7

au.com.forward.runWST
Class ErrorLogListener

java.lang.Object
  extended byau.com.forward.runWST.ErrorLogListener
All Implemented Interfaces:
StringTemplateErrorListener

public class ErrorLogListener
extends java.lang.Object
implements StringTemplateErrorListener

This is the error listener used for RunWST.
It remembers the first error it sees.

Author:
matthew ford

Field Summary
static java.util.logging.Logger logger
          The Java logger for this class
 
Constructor Summary
ErrorLogListener()
           
 
Method Summary
 void clearMessages()
          Clears the first error message and exception.
 void debug(java.lang.String msg)
          A debugging handler, superceeded by Java logging.
 void error(java.lang.String msg, java.lang.Throwable t)
          An Error handler.
 java.lang.String getFirstErrorMessage()
          Gets the first error message seen.
 java.lang.Throwable getFirstException()
          Gets the first exception seen.
 void warning(java.lang.String msg)
          An Warning handler.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final java.util.logging.Logger logger
The Java logger for this class

Constructor Detail

ErrorLogListener

public ErrorLogListener()
Method Detail

error

public void error(java.lang.String msg,
                  java.lang.Throwable t)
An Error handler.
Saves the first error it sees. Logs all errors at Level.FINER

Specified by:
error in interface StringTemplateErrorListener
Parameters:
msg - the error message
t - the exception

warning

public void warning(java.lang.String msg)
An Warning handler.
Just logs the warning at Level.FINER

Specified by:
warning in interface StringTemplateErrorListener
Parameters:
msg - the warning message

debug

public void debug(java.lang.String msg)
A debugging handler, superceeded by Java logging.

Specified by:
debug in interface StringTemplateErrorListener
Parameters:
msg - the debug message

getFirstErrorMessage

public java.lang.String getFirstErrorMessage()
Gets the first error message seen.

Returns:
The firstErrorMessage

getFirstException

public java.lang.Throwable getFirstException()
Gets the first exception seen.

Returns:
The firstException value

clearMessages

public void clearMessages()
Clears the first error message and exception.


Forward Computing and Control Pty. Ltd.
WebStringTemplate V1.5.0

2004/1/7

Copyright ©2003, Forward Computing and Control Pty. Ltd
ACN 003 669 994   NSW Australia,   All Rights Reserved.
WebStringTemplate and associated code is released under licence. See the source.
WebStringTemplate uses code from StringTemplates and Antlr, under licence.
See the WebStringTemplate licence file for details.