Package groovy.text
Class TemplateParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.text.TemplateParseException
- All Implemented Interfaces:
Serializable
A custom exception class to flag template parsing errors
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateParseException(int lineNumber, int column) Creates an exception for a parse failure at the supplied template position.TemplateParseException(String message, int lineNumber, int column) Creates an exception for a parse failure at the supplied template position.TemplateParseException(String message, Throwable cause, int lineNumber, int column) Creates an exception for a parse failure at the supplied template position.TemplateParseException(Throwable t, int lineNumber, int column) Creates an exception for a parse failure at the supplied template position. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the column where parsing failed.intReturns the line where parsing failed.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TemplateParseException
public TemplateParseException(int lineNumber, int column) Creates an exception for a parse failure at the supplied template position.- Parameters:
lineNumber- one-based line number in the template sourcecolumn- one-based column number in the template source
-
TemplateParseException
Creates an exception for a parse failure at the supplied template position.- Parameters:
message- a description of the parse failurelineNumber- one-based line number in the template sourcecolumn- one-based column number in the template source
-
TemplateParseException
Creates an exception for a parse failure at the supplied template position.- Parameters:
message- a description of the parse failurecause- the underlying parse failurelineNumber- one-based line number in the template sourcecolumn- one-based column number in the template source
-
TemplateParseException
Creates an exception for a parse failure at the supplied template position.- Parameters:
t- the underlying parse failurelineNumber- one-based line number in the template sourcecolumn- one-based column number in the template source
-
-
Method Details
-
getLineNumber
public int getLineNumber()Returns the line where parsing failed.- Returns:
- the one-based line number of the parse failure
-
getColumn
public int getColumn()Returns the column where parsing failed.- Returns:
- the one-based column number of the parse failure
-