freemarker.template

## Class TemplateModelException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - freemarker.template.TemplateException
      - - freemarker.template.TemplateModelException

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  InvalidPropertyException

    public class TemplateModelException
    extends TemplateException

`TemplateModel` methods throw this exception if the requested data can't be retrieved.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`` `TemplateModelException()` Constructs a `TemplateModelException` with no specified detail message.
`` `TemplateModelException(Exception cause)` The same as `TemplateModelException(Throwable)`; it's exists only for binary backward-compatibility.
`` `TemplateModelException(String description)` Constructs a `TemplateModelException` with the specified detail message.
`` `TemplateModelException(String description, Exception cause)` The same as `TemplateModelException(String, Throwable)`; it's exists only for binary backward-compatibility.
`` `TemplateModelException(String description, Throwable cause)` Constructs a TemplateModelException with both a description of the error that occurred and the underlying Exception that caused this exception to be raised.
`` `TemplateModelException(Throwable cause)` Constructs a `TemplateModelException` with the given underlying Exception, but no detail message.
`protected` `TemplateModelException(Throwable cause, Environment env, freemarker.core._ErrorDescriptionBuilder descriptionBuilder, boolean preventAmbiguity)` Don't use this; this is to be used internally by FreeMarker.
`protected` `TemplateModelException(Throwable cause, Environment env, String description, boolean preventAmbiguity)` Don't use this; this is to be used internally by FreeMarker.

### Method Summary

### Methods inherited from class freemarker.template.TemplateException

`getBlamedExpressionString, getCauseException, getColumnNumber, getEndColumnNumber, getEndLineNumber, getEnvironment, getFTLInstructionStack, getLineNumber, getMessage, getMessageWithoutStackTop, getTemplateName, getTemplateSourceName, printStackTrace, printStackTrace, printStackTrace, printStackTrace, printStandardStackTrace, printStandardStackTrace`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, 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.

#### TemplateModelException

    public TemplateModelException(String description)

Constructs a `TemplateModelException` with the specified detail message.

Parameters:
  `description` - the detail message.

#### TemplateModelException

    public TemplateModelException(Exception cause)

The same as `TemplateModelException(Throwable)`; it's exists only for binary backward-compatibility.

#### TemplateModelException

    public TemplateModelException(Throwable 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(String description,
                                  Exception cause)

The same as `TemplateModelException(String, Throwable)`; it's exists only for binary backward-compatibility.

#### TemplateModelException

    public TemplateModelException(String description,
                                  Throwable 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

#### TemplateModelException

    protected TemplateModelException(Throwable cause,
                                     Environment env,
                                     String description,
                                     boolean preventAmbiguity)

Don't use this; this is to be used internally by FreeMarker.

Parameters:
  `preventAmbiguity` - its value is ignored; it's only to prevent constructor selection ambiguities for backward-compatibility

#### TemplateModelException

    protected TemplateModelException(Throwable cause,
                                     Environment env,
                                     freemarker.core._ErrorDescriptionBuilder descriptionBuilder,
                                     boolean preventAmbiguity)

Don't use this; this is to be used internally by FreeMarker.

Parameters:
  `preventAmbiguity` - its value is ignored; it's only to prevent constructor selection ambiguities for backward-compatibility