freemarker.testcase.models
Class ExceptionModel

java.lang.Object
  |
  +--freemarker.testcase.models.ExceptionModel
All Implemented Interfaces:
TemplateModel, TemplateScalarModel

public final class ExceptionModel
extends java.lang.Object
implements TemplateScalarModel

A template that always throws an exception whenever we call getAsString().

Version:
$Id: ExceptionModel.java,v 1.6 2003/11/28 01:17:07 run2000 Exp $

Constructor Summary
ExceptionModel()
          Creates new ExceptionModel.
 
Method Summary
 java.lang.String getAsString()
          Returns the scalar's value as a String.
 boolean isEmpty()
          Is the model empty?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionModel

public ExceptionModel()
Creates new ExceptionModel.
Method Detail

getAsString

public java.lang.String getAsString()
                             throws TemplateModelException
Returns the scalar's value as a String.
Specified by:
getAsString in interface TemplateScalarModel
Returns:
the String value of this scalar.
Throws:
TemplateModelException - something went wrong retrieving the value

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the model empty?
Specified by:
isEmpty in interface TemplateModel
Returns:
false to indicate the model is not empty