Package org.apache.velocity.exception
Class TemplateInitException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.velocity.exception.VelocityException
-
- org.apache.velocity.exception.TemplateInitException
-
- All Implemented Interfaces:
Serializable
,ExtendedParseException
public class TemplateInitException extends VelocityException implements ExtendedParseException
Exception generated to indicate parse errors caught during directive initialization (e.g. wrong number of arguments)- Since:
- 1.5
- Version:
- $Id$
- Author:
- Will Glass-Husain
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TemplateInitException(String msg, String templateName, int col, int line)
TemplateInitException(String msg, ParseException parseException, String[] stacktrace, String templateName, int col, int line)
TemplateInitException(String msg, ParseException parseException, String templateName, int col, int line)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnNumber()
Returns the column number where this exception occurred.int
getLineNumber()
Returns the line number where this exception occurred.String
getTemplateName()
Returns the Template name where this exception occurred.-
Methods inherited from class org.apache.velocity.exception.VelocityException
getVtlStackTrace, getWrappedThrowable
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
TemplateInitException
public TemplateInitException(String msg, String templateName, int col, int line)
- Parameters:
msg
-templateName
-col
-line
-
-
TemplateInitException
public TemplateInitException(String msg, ParseException parseException, String templateName, int col, int line)
- Parameters:
msg
-parseException
-templateName
-col
-line
-
-
TemplateInitException
public TemplateInitException(String msg, ParseException parseException, String[] stacktrace, String templateName, int col, int line)
- Parameters:
msg
-parseException
-stacktrace
-templateName
-col
-line
-- Since:
- 2.2
-
-
Method Detail
-
getTemplateName
public String getTemplateName()
Returns the Template name where this exception occurred.- Specified by:
getTemplateName
in interfaceExtendedParseException
- Returns:
- the template name
-
getLineNumber
public int getLineNumber()
Returns the line number where this exception occurred.- Specified by:
getLineNumber
in interfaceExtendedParseException
- Returns:
- the line number
-
getColumnNumber
public int getColumnNumber()
Returns the column number where this exception occurred.- Specified by:
getColumnNumber
in interfaceExtendedParseException
- Returns:
- the line number
-
-