wt.htmlutil
Class ExceptionAction

java.lang.Object
  extended bywt.htmlutil.ExceptionAction
All Implemented Interfaces:
TemplateAction

public class ExceptionAction
extends Object
implements TemplateAction

ExceptionAction is a TemplateAction that stores an exception during template processing. It only dumps it to stdout and throws it when the cached template is executed. Exception handling is done in this way to provide a stack trace on the first and all subsequent page hits while still allowing the caching process to function normally. To fix the problem causing the exception, either the template must be edited or the server must be shut down. In either case, the template will be re-read and re-cached, so there is no chance of stale exceptions remaining in the system.


Field Summary
private static boolean TEMPLATE_VERBOSE
          Deprecated.  
private  String theClass
          Deprecated.  
private  String theMethod
          Deprecated.  
private  WTException theWTException
          Deprecated.  
 
Constructor Summary
private ExceptionAction()
          Deprecated.  
  ExceptionAction(WTException aWTException)
          Deprecated.  
  ExceptionAction(WTException aWTException, String aClass, String aMethod)
          Deprecated.  
 
Method Summary
 void action(OutputStream out, Object context, Locale locale, boolean includeLocale)
          Deprecated. action writes the exception's stack trace to stdout and throws the exception for handling by other classes.
 String getClassName()
          Deprecated.  
 WTException getException()
          Deprecated.  
 String getMethodName()
          Deprecated.  
 void setClassName(String aClass)
          Deprecated.  
 void setException(WTException aWTException)
          Deprecated.  
 void setMethodName(String aMethod)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theWTException

private WTException theWTException
Deprecated. 

theClass

private String theClass
Deprecated. 

theMethod

private String theMethod
Deprecated. 

TEMPLATE_VERBOSE

private static final boolean TEMPLATE_VERBOSE
Deprecated. 
Constructor Detail

ExceptionAction

private ExceptionAction()
Deprecated. 

ExceptionAction

public ExceptionAction(WTException aWTException)
Deprecated. 

ExceptionAction

public ExceptionAction(WTException aWTException,
                       String aClass,
                       String aMethod)
Deprecated. 
Method Detail

action

public void action(OutputStream out,
                   Object context,
                   Locale locale,
                   boolean includeLocale)
            throws WTException
Deprecated. 
action writes the exception's stack trace to stdout and throws the exception for handling by other classes. Since the exception was created within ProcessTemplate.parseTemplateCached, it will show the correct stack trace, even though it is not thrown until now.

Specified by:
action in interface TemplateAction
Parameters:
out - The OutputStream passed to the method
context - The object instance to invoke the method on, or null if static
locale - The Locale passed to the method
includeLocale - A flag specifying whether to include locale in the parameters
Throws:
WTException

setException

public void setException(WTException aWTException)
Deprecated. 

getException

public WTException getException()
Deprecated. 

setClassName

public void setClassName(String aClass)
Deprecated. 

getClassName

public String getClassName()
Deprecated. 

setMethodName

public void setMethodName(String aMethod)
Deprecated. 

getMethodName

public String getMethodName()
Deprecated.