Package: groovy.text

## [Java] Class TemplateExecutionException

- groovy.text.TemplateExecutionException

-     public class TemplateExecutionException
      extends Exception

  A custom exception class to flag template execution errors

- - ### Constructor Summary

    Constructors
    Constructor and 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.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public int` | `getLineNumber()` Returns the line number in the template source where the error occurred

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Exception` | `addSuppressed, equals, fillInStackTrace, getCause, getClass, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, hashCode, initCause, notify, notifyAll, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### 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

    - #### 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

    - #### 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

    - #### 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 Detail

    - #### 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