Save This Page
Home » freemarker-2.3.13 » freemarker.template » [javadoc | source]
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.
Constructor:
 public TemplateException(Environment env) 
    Constructs a TemplateException with no specified detail message or underlying cause.
 public TemplateException(String description,
    Environment 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) 
    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) 
    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
Method from freemarker.template.TemplateException Summary:
getCause,   getCauseException,   getEnvironment,   getFTLInstructionStack,   printStackTrace,   printStackTrace
Methods from java.lang.Throwable:
fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.template.TemplateException Detail:
 public Throwable getCause() 
    Returns the same exception as getCauseException. Provided to enable full JDK-generated stack traces when running under JDK 1.4.
 public 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.

 public Environment getEnvironment() 
 public String getFTLInstructionStack() 
    Returns the quote of the problematic FTL instruction and the FTL stack strace.
 public  void printStackTrace(PrintStream ps) 
 public  void printStackTrace(PrintWriter pw)