Package freemarker.template
Class TemplateNotFoundException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- java.io.FileNotFoundException
-
- freemarker.template.TemplateNotFoundException
-
- All Implemented Interfaces:
java.io.Serializable
public final class TemplateNotFoundException extends java.io.FileNotFoundException
Thrown whenConfiguration.getTemplate(String)
(or similar) doesn't find a template. This extendsFileNotFoundException
for backward compatibility, but in fact has nothing to do with files, as FreeMarker can load templates from many other sources.- Since:
- 2.3.22
- See Also:
MalformedTemplateNameException
,Configuration.getTemplate(String)
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TemplateNotFoundException(java.lang.String templateName, java.lang.Object customLookupCondition, java.lang.String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getCustomLookupCondition()
The custom lookup condition with which the template was requested, ornull
if there's no such condition.java.lang.String
getTemplateName()
The name (path) of the template that wasn't found.
-
-
-
Method Detail
-
getTemplateName
public java.lang.String getTemplateName()
The name (path) of the template that wasn't found.
-
getCustomLookupCondition
public java.lang.Object getCustomLookupCondition()
The custom lookup condition with which the template was requested, ornull
if there's no such condition. See thecustomLookupCondition
parameter ofConfiguration.getTemplate(String, java.util.Locale, Object, String, boolean, boolean)
.
-
-