freemarker.template
Class TemplateModelException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by freemarker.template.TemplateException
              extended by freemarker.template.TemplateModelException
All Implemented Interfaces:
java.io.Serializable

public class TemplateModelException
extends TemplateException

Template model classes should throw this exception if requested data cannot be retrieved. Its detail message will be used to build an error message in the output of a template using the model.

Version:
$Id: TemplateModelException.java 1101 2013-04-01 04:17:32Z run2000 $
See Also:
Serialized Form

Constructor Summary
TemplateModelException()
          Constructs a TemplateModelException with no specified detail message or underlying cause.
TemplateModelException(java.lang.Exception cause)
          Constructs a TemplateModelException with the given underlying Exception, but no detail message.
TemplateModelException(java.lang.String description)
          Constructs a TemplateModelException with the specified detail message, but no underlying cause Exception.
TemplateModelException(java.lang.String description, java.lang.Exception cause)
          Constructs a TemplateModelException with both a description of the error that occurred and the underlying Exception that caused this exception to be raised.
 
Method Summary
 
Methods inherited from class freemarker.template.TemplateException
getCause, getCauseException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateModelException

public TemplateModelException()
Constructs a TemplateModelException with no specified detail message or underlying cause.


TemplateModelException

public TemplateModelException(java.lang.String description)
Constructs a TemplateModelException with the specified detail message, but no underlying cause Exception.

Parameters:
description - the detail message.

TemplateModelException

public TemplateModelException(java.lang.Exception cause)
Constructs a TemplateModelException with the given underlying Exception, but no detail message.

Parameters:
cause - the underlying Exception that caused this exception to be raised

TemplateModelException

public TemplateModelException(java.lang.String description,
                              java.lang.Exception cause)
Constructs a TemplateModelException with both a description of the error that occurred and the underlying Exception that caused this exception to be raised.

Parameters:
description - the description of the error that occurred
cause - the underlying Exception that caused this exception to be raised