freemarker.template
Class TemplateException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--freemarker.template.TemplateException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- NonNumericalException, StopException, TemplateModelException
- public class TemplateException
- extends java.lang.Exception
The FreeMarker classes use this exception internally.
- Version:
- $Id: TemplateException.java,v 1.7 2002/04/30 13:29:23 revusky Exp $
- See Also:
- Serialized Form
Constructor Summary |
TemplateException()
Constructs a TemplateException with no specified detail message
or underlying cause. |
TemplateException(java.lang.Exception cause)
Constructs a TemplateException with the given underlying Exception,
but no detail message. |
TemplateException(java.lang.String description)
Constructs a TemplateException with the given detail message,
but no underlying cause exception. |
TemplateException(java.lang.String description,
java.lang.Exception cause)
Constructs a TemplateException with both a description of the error
that occurred and the underlying Exception that caused this exception
to be raised. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TemplateException
public TemplateException()
- Constructs a TemplateException with no specified detail message
or underlying cause.
TemplateException
public TemplateException(java.lang.String description)
- Constructs a TemplateException with the given detail message,
but no underlying cause exception.
- Parameters:
description
- the description of the error that occurred
TemplateException
public TemplateException(java.lang.Exception cause)
- Constructs a TemplateException with the given underlying Exception,
but no detail message.
- Parameters:
cause
- the underlying Exception
that caused this
exception to be raised
TemplateException
public TemplateException(java.lang.String description,
java.lang.Exception cause)
- 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 occurredcause
- the underlying Exception
that caused this
exception to be raised
getCauseException
public java.lang.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
.
- Returns:
- the underlying
Exception
, if any, that caused this
exception to be raised
printStackTrace
public void printStackTrace(java.io.PrintStream ps)
- Overrides:
printStackTrace
in class java.lang.Throwable
printStackTrace
public void printStackTrace(java.io.PrintWriter pw)
- Overrides:
printStackTrace
in class java.lang.Throwable