## Uses of Class
freemarker.template.TemplateException

Packages that use TemplateException
freemarker.core: The seldom used or advanced parts of the fundamental FreeMarker API, compared to `freemarker.template`.
freemarker.ext.beans: The `default object wrapper` of FreeMarker uses this to expose Java Beans and POJO-s to templates, but it can also be used in itself as a better alternative `ObjectWrapper`.
freemarker.ext.servlet: Servlet for legacy "Model 2" frameworks that allows using FreeMarker templates instead of JSP as the MVC View (see in the Manual).
freemarker.template: The fundamental, most commonly used API-s of FreeMarker; start with `Configuration` (see also the Getting Stared in the Manual.)

### Uses of TemplateException in freemarker.core

Subclasses of TemplateException in freemarker.core
`class` `freemarker.core._MiscTemplateException`
`static class` `Configurable.SettingValueAssignmentException` The setting name was recognized, but its value couldn't be parsed or the setting couldn't be set for some other reason.
`static class` `Configurable.UnknownSettingException` The setting name was not recognized.
`class` `InvalidReferenceException` A subclass of `TemplateException` that says that an FTL expression has evaluated to `null` or it refers to something that doesn't exist.
`class` `NonBooleanException` Indicates that a `TemplateBooleanModel` value was expected, but the value had a different type.
`class` `NonDateException` Indicates that a `TemplateDateModel` value was expected, but the value had a different type.
`class` `NonExtendedHashException` Indicates that a `TemplateHashModelEx` value was expected, but the value had a different type.
`class` `NonHashException` Indicates that a `TemplateHashModel` value was expected, but the value had a different type.
`class` `NonMarkupOutputException` Indicates that a `TemplateMarkupOutputModel` value was expected, but the value had a different type.
`class` `NonMethodException` Indicates that a `TemplateMethodModel` value was expected, but the value had a different type.
`class` `NonNodeException` Indicates that a `TemplateNodeModel` value was expected, but the value had a different type.
`class` `NonNumericalException` Indicates that a `TemplateNumberModel` value was expected, but the value had a different type.
`class` `NonSequenceException` Indicates that a `TemplateSequenceModel` value was expected, but the value had a different type.
`class` `NonSequenceOrCollectionException` Indicates that a `TemplateSequenceModel` or `TemplateCollectionModel` value was expected, but the value had a different type.
`class` `NonStringException` Indicates that a `TemplateScalarModel` value was expected (or maybe something that can be automatically coerced to that), but the value had a different type.
`class` `NonStringOrTemplateOutputException` Indicates that a `TemplateScalarModel` (or maybe something that can be automatically coerced to that) or `TemplateMarkupOutputModel` value was expected, but the value had a different type.
`class` `StopException` This exception is thrown when a `#stop` directive is encountered.
`class` `UnexpectedTypeException` The type of a value differs from what was expected.

Methods in freemarker.core that return TemplateException
`protected TemplateException` Configurable.`invalidSettingValueException(String name, String value)`
`protected TemplateException` Configurable.`settingValueAssignmentException(String name, String value, Throwable cause)`
`protected TemplateException` Configurable.`unknownSettingException(String name)` Creates the exception that should be thrown when a setting name isn't recognized.

Methods in freemarker.core that throw TemplateException
`void` Environment.`__setitem__(String key, Object o)` A hook that Jython uses.
`abstract Number` ArithmeticEngine.`add(Number first, Number second)`
`Number` ArithmeticEngine.ConservativeEngine.`add(Number first, Number second)`
`boolean` Environment.`applyEqualsOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "==" operator.
`boolean` Environment.`applyEqualsOperatorLenient(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "==" operator, except that if the two types are incompatible, they are treated as non-equal instead of throwing an exception.
`boolean` Environment.`applyGreaterThanOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL ">" operator.
`boolean` Environment.`applyLessThanOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "<" operator.
`boolean` Environment.`applyLessThanOrEqualsOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL "<" operator.
`boolean` Environment.`applyWithGreaterThanOrEqualsOperator(TemplateModel leftValue, TemplateModel rightValue)` Compares two `TemplateModel`-s according the rules of the FTL ">=" operator.
`abstract int` ArithmeticEngine.`compareNumbers(Number first, Number second)`
`int` ArithmeticEngine.ConservativeEngine.`compareNumbers(Number first, Number second)`
`abstract Number` ArithmeticEngine.`divide(Number first, Number second)`
`Number` ArithmeticEngine.ConservativeEngine.`divide(Number first, Number second)`
`protected void` Configurable.`doAutoImportsAndIncludes(Environment env)` Executes the auto-imports and auto-includes for the main template of this environment.
`Environment.Namespace` Environment.`importLib(String templateName, String targetNsVarName)` Emulates `import` directive, except that `templateName` must be template root relative.
`Environment.Namespace` Environment.`importLib(String templateName, String targetNsVarName, boolean lazy)` Like `Environment.importLib(String, String)`, but you can specify if you want a lazy import or not.
`Environment.Namespace` Environment.`importLib(Template loadedTemplate, String targetNsVarName)` Does what the `#import` directive does, but with an already loaded template.
`void` Environment.`include(String name, String encoding, boolean parse)` Emulates `include` directive, except that `name` must be tempate root relative.
`void` Environment.`include(Template includedTemplate)` Processes a Template in the context of this `Environment`, including its output in the `Environment`'s Writer.
`abstract Number` ArithmeticEngine.`modulus(Number first, Number second)`
`Number` ArithmeticEngine.ConservativeEngine.`modulus(Number first, Number second)`
`abstract Number` ArithmeticEngine.`multiply(Number first, Number second)`
`Number` ArithmeticEngine.ConservativeEngine.`multiply(Number first, Number second)`
`void` Environment.`process()` Processes the template to which this environment belongs to.
`Class` TemplateClassResolver.`resolve(String className, Environment env, Template template)` Gets a `Class` based on the class name.
`Class` OptInTemplateClassResolver.`resolve(String className, Environment env, Template template)`
`void` Configurable.`setSetting(String name, String value)` Sets a FreeMarker setting by a name and string value.
`void` Configurable.`setSettings(InputStream propsIn)` Reads a setting list (key and element pairs) from the input stream.
`void` Configurable.`setSettings(Properties props)` Set the settings stored in a `Properties` object.
`abstract Number` ArithmeticEngine.`subtract(Number first, Number second)`
`Number` ArithmeticEngine.ConservativeEngine.`subtract(Number first, Number second)`
`void` Environment.`visit(freemarker.core.TemplateElement element, TemplateDirectiveModel directiveModel, Map args, List bodyParameterNames)` Deprecated. Should be internal API

### Uses of TemplateException in freemarker.ext.beans

Subclasses of TemplateException in freemarker.ext.beans
`class` `InvalidPropertyException` An exception thrown when there is an attempt to access an invalid bean property when we are in a "strict bean" mode

### Uses of TemplateException in freemarker.ext.servlet

Methods in freemarker.ext.servlet that throw TemplateException
`void` IncludePage.`execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)`
`protected void` FreemarkerServlet.`processEnvironment(Environment env, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` This is the method that actually executes the template.

### Uses of TemplateException in freemarker.template

Subclasses of TemplateException in freemarker.template
`class` `TemplateModelException` `TemplateModel` methods throw this exception if the requested data can't be retrieved.

Methods in freemarker.template with parameters of type TemplateException
`void` TemplateExceptionHandler.`handleTemplateException(TemplateException te, Environment env, Writer out)` Method called after a `TemplateException` was raised inside a template.

Methods in freemarker.template that throw TemplateException
`Environment` Template.`createProcessingEnvironment(Object dataModel, Writer out)` Same as `createProcessingEnvironment(dataModel, out, null)`.
`Environment` Template.`createProcessingEnvironment(Object dataModel, Writer out, ObjectWrapper wrapper)` Creates a `Environment` object, using this template, the data-model provided as parameter.
`protected void` Configuration.`doAutoImportsAndIncludes(Environment env)`
`void` TemplateDirectiveModel.`execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)` Executes this user-defined directive; called by FreeMarker when the user-defined directive is called in the template.
`void` TemplateExceptionHandler.`handleTemplateException(TemplateException te, Environment env, Writer out)` Method called after a `TemplateException` was raised inside a template.
`void` Template.`process(Object dataModel, Writer out)` Executes template, using the data-model provided, writing the generated output to the supplied `Writer`.
`void` Template.`process(Object dataModel, Writer out, ObjectWrapper wrapper)` Like `Template.process(Object, Writer)`, but overrides the `Configurable.getObjectWrapper()`.
`void` Template.`process(Object dataModel, Writer out, ObjectWrapper wrapper, TemplateNodeModel rootNode)` Like `Template.process(Object, Writer)`, but also sets a (XML-)node to be recursively processed by the template.
`void` TemplateDirectiveBody.`render(Writer out)` Renders the body of the directive body to the specified writer.
`void` Configuration.`setSetting(String name, String value)`