freemarker.template
public class: TemplateException [javadoc |
source]
java.lang.Object
java.lang.Throwable
java.lang.Exception
freemarker.template.TemplateException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InvalidPropertyException, NonStringException, UnknownSettingException, InvalidReferenceException, StopException, TemplateModelException, NonBooleanException, NonNumericalException
The FreeMarker classes usually use this exception and its descendants to
signal FreeMarker specific exceptions.
- version:
$ - Id: TemplateException.java,v 1.26.2.1 2006/02/12 20:02:15 revusky Exp $
| Constructor: |
public TemplateException(Environment env) {
this(null, null, env);
}
Constructs a TemplateException with no specified detail message
or underlying cause. |
public TemplateException(String description,
Environment env) {
this(description, null, env);
}
Constructs a TemplateException with the given detail message,
but no underlying cause exception. Parameters:
description - the description of the error that occurred
|
public TemplateException(Exception cause,
Environment env) {
this(null, cause, env);
}
Constructs a TemplateException with the given underlying Exception,
but no detail message. Parameters:
cause - the underlying Exception that caused this
exception to be raised
|
public TemplateException(String description,
Exception cause,
Environment env) {
super(getDescription(description, cause));
causeException = cause;
this.env = env;
if(env != null)
{
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
env.outputInstructionStack(pw);
pw.flush();
ftlInstructionStack = sw.toString();
}
else
{
ftlInstructionStack = "";
}
}
Constructs a TemplateException 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
|
| Methods from java.lang.Throwable: |
|---|
|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |