TemplateExecutionException (Groovy 2.4.7)
Date: 2016-06-03

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 and Description
    `TemplateExecutionException(int lineNumber)`
    `TemplateExecutionException(int lineNumber, String message)`
    `TemplateExecutionException(int lineNumber, String message, Throwable cause)`
    `TemplateExecutionException(int lineNumber, Throwable cause)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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 Detail

    - #### TemplateExecutionException

          public TemplateExecutionException(int lineNumber)

    - #### TemplateExecutionException

          public TemplateExecutionException(int lineNumber,
                                    String message)

    - #### TemplateExecutionException

          public TemplateExecutionException(int lineNumber,
                                    String message,
                                    Throwable cause)

    - #### TemplateExecutionException

          public TemplateExecutionException(int lineNumber,
                                    Throwable cause)

  - ### Method Detail

    - #### 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 parsing error.