freemarker.template
public class TemplateException extends Exception
Constructor and Description |
---|
TemplateException(Environment env)
Constructs a TemplateException with no specified detail message
or underlying cause.
|
TemplateException(Exception cause,
Environment env)
Constructs a TemplateException with the given underlying Exception,
but no detail message.
|
TemplateException(String description,
Environment env)
Constructs a TemplateException with the given detail message,
but no underlying cause exception.
|
TemplateException(String description,
Exception cause,
Environment env)
Constructs a TemplateException with both a description of the error
that occurred and the underlying Exception that caused this exception
to be raised.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause()
Returns the same exception as
getCauseException . |
Exception |
getCauseException()
Returns the underlying exception that caused this exception to be
generated.
|
Environment |
getEnvironment() |
String |
getFTLInstructionStack()
Returns the quote of the problematic FTL instruction and the FTL stack strace.
|
void |
printStackTrace(PrintStream ps) |
void |
printStackTrace(PrintWriter pw) |
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
public TemplateException(Environment env)
public TemplateException(String description, Environment env)
description
- the description of the error that occurredpublic TemplateException(Exception cause, Environment env)
cause
- the underlying Exception
that caused this
exception to be raisedpublic TemplateException(String description, Exception cause, Environment env)
description
- the description of the error that occurredcause
- the underlying Exception
that caused this
exception to be raisedpublic Exception getCauseException()
Returns the underlying exception that caused this exception to be generated.
Note:
avoided calling it getCause
to avoid name clash with
JDK 1.4 method. This would be problematic because the JDK 1.4 method
returns a Throwable
rather than an Exception
.
Exception
, if any, that caused this
exception to be raisedpublic Throwable getCause()
getCauseException
. Provided
to enable full JDK-generated stack traces when running under JDK 1.4.getCause
in class Throwable
Exception
, if any, that caused this
exception to be raisedThrowable.getCause()
public String getFTLInstructionStack()
public Environment getEnvironment()
public void printStackTrace(PrintStream ps)
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter pw)
printStackTrace
in class Throwable