Package groovy.text

# Class TemplateExecutionException

java.lang.Object
java.lang.Throwable
java.lang.Exception
groovy.text.TemplateExecutionException

All Implemented Interfaces:
  `Serializable`

public class TemplateExecutionException extends Exception
A custom exception class to flag template execution errors

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TemplateExecutionException(int lineNumber)`
  Creates an exception for an execution failure at the supplied template line.
  `TemplateExecutionException(int lineNumber, String message)`
  Creates an exception for an execution failure at the supplied template line.
  `TemplateExecutionException(int lineNumber, String message, Throwable cause)`
  Creates an exception for an execution failure at the supplied template line.
  `TemplateExecutionException(int lineNumber, Throwable cause)`
  Creates an exception for an execution failure at the supplied template line.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getLineNumber()`
  Returns the line number in the template source where the error occurred

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

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### TemplateExecutionException

    public TemplateExecutionException(int lineNumber)
    Creates an exception for an execution failure at the supplied template line.
    Parameters:
      `lineNumber` - one-based line number in the template source

  - ### TemplateExecutionException

    public TemplateExecutionException(int lineNumber, String message)
    Creates an exception for an execution failure at the supplied template line.
    Parameters:
      `lineNumber` - one-based line number in the template source
      `message` - a description of the execution failure

  - ### TemplateExecutionException

    public TemplateExecutionException(int lineNumber, String message, Throwable cause)
    Creates an exception for an execution failure at the supplied template line.
    Parameters:
      `lineNumber` - one-based line number in the template source
      `message` - a description of the execution failure
      `cause` - the underlying execution failure

  - ### TemplateExecutionException

    public TemplateExecutionException(int lineNumber, Throwable cause)
    Creates an exception for an execution failure at the supplied template line.
    Parameters:
      `lineNumber` - one-based line number in the template source
      `cause` - the underlying execution failure

- ## Method Details

  - ### getLineNumber

    public int getLineNumber()
    Returns the line number in the template source where the error occurred
    Returns:
      the one-based line number of the template execution error