org.melati.template.webmacro
Class PropagateEvaluationExceptionHandler

java.lang.Object
  extended by org.melati.template.webmacro.PropagateEvaluationExceptionHandler
All Implemented Interfaces:
org.webmacro.engine.EvaluationExceptionHandler

public class PropagateEvaluationExceptionHandler
extends java.lang.Object
implements org.webmacro.engine.EvaluationExceptionHandler

An implementation of EvaluationExceptionHandler which throws an exception whenever it is called. This will generally cause the exception to be displayed to the user -- useful for debugging. Modified to allow #if ($null).

Author:
Tim Joyce

Constructor Summary
PropagateEvaluationExceptionHandler()
          Constructor.
PropagateEvaluationExceptionHandler(org.webmacro.Broker b)
          Constructor.
 
Method Summary
 java.lang.String errorString(java.lang.String errorText)
          
 void evaluate(org.webmacro.engine.Variable variable, org.webmacro.Context context, java.lang.Exception problem)
          
 java.lang.String expand(org.webmacro.engine.Variable variable, org.webmacro.Context context, java.lang.Exception problem)
          
 void init(org.webmacro.Broker b, org.webmacro.util.Settings config)
          
 java.lang.String warningString(java.lang.String warningText)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropagateEvaluationExceptionHandler

public PropagateEvaluationExceptionHandler()
Constructor.


PropagateEvaluationExceptionHandler

public PropagateEvaluationExceptionHandler(org.webmacro.Broker b)
Constructor.

Parameters:
b - the WebMacro broker
Method Detail

init

public void init(org.webmacro.Broker b,
                 org.webmacro.util.Settings config)

Specified by:
init in interface org.webmacro.engine.EvaluationExceptionHandler
See Also:
init(org.webmacro.Broker, org.webmacro.util.Settings)

evaluate

public void evaluate(org.webmacro.engine.Variable variable,
                     org.webmacro.Context context,
                     java.lang.Exception problem)
              throws org.webmacro.PropertyException

Specified by:
evaluate in interface org.webmacro.engine.EvaluationExceptionHandler
Throws:
org.webmacro.PropertyException
See Also:
evaluate(org.webmacro.engine.Variable, org.webmacro.Context, java.lang.Exception)

expand

public java.lang.String expand(org.webmacro.engine.Variable variable,
                               org.webmacro.Context context,
                               java.lang.Exception problem)
                        throws org.webmacro.PropertyException

Specified by:
expand in interface org.webmacro.engine.EvaluationExceptionHandler
Throws:
org.webmacro.PropertyException
See Also:
EvaluationExceptionHandler.expand( org.webmacro.engine.Variable, org.webmacro.Context, java.lang.Exception)

warningString

public java.lang.String warningString(java.lang.String warningText)
                               throws org.webmacro.PropertyException

Specified by:
warningString in interface org.webmacro.engine.EvaluationExceptionHandler
Throws:
org.webmacro.PropertyException
See Also:
EvaluationExceptionHandler.warningString(java.lang.String)

errorString

public java.lang.String errorString(java.lang.String errorText)
                             throws org.webmacro.PropertyException

Specified by:
errorString in interface org.webmacro.engine.EvaluationExceptionHandler
Throws:
org.webmacro.PropertyException
See Also:
EvaluationExceptionHandler.errorString(java.lang.String)


Copyright © 2000-2008 PanEris. All Rights Reserved.