Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api
Class GradleScriptException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  org.gradle.api.GradleException
                      org.gradle.api.GradleScriptException

All Implemented Interfaces:
  java.io.Serializable

    public class GradleScriptException

extends GradleException

A `GradleScriptException` is thrown when an exception occurs in the parsing or execution of a script.

See Also:
  Serialized Form

Constructor Summary
`GradleScriptException(java.lang.String message, java.lang.Throwable cause, ScriptSource scriptSource)`
`GradleScriptException(java.lang.String message, java.lang.Throwable cause, ScriptSource scriptSource, java.lang.Integer lineNumber)`

Method Summary
`java.lang.Integer` | `getLineNumber()` Returns the line in the script where this exception occurred, if known.
`java.lang.String` | `getLocation()` Returns a description of the location of where this execption occurred.
`java.lang.String` | `getMessage()`
`java.lang.String` | `getOriginalMessage()` Returns the undecorated message of this exception.
`GradleScriptException` | `getReportableException()` Returns the reportable exception for this failure.
`ScriptSource` | `getScriptSource()` Returns the source the script where this of this exception occurred.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, 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

### GradleScriptException

    public GradleScriptException(java.lang.String message,
                                 java.lang.Throwable cause,
                                 ScriptSource scriptSource)

### GradleScriptException

    public GradleScriptException(java.lang.String message,
                                 java.lang.Throwable cause,
                                 ScriptSource scriptSource,
                                 java.lang.Integer lineNumber)

Method Detail

### getOriginalMessage

    public java.lang.String getOriginalMessage()

  Returns the undecorated message of this exception.

  Returns:
    The undecorated message. Never returns null.

### getScriptSource

    public ScriptSource getScriptSource()

  Returns the source the script where this of this exception occurred.

  Returns:
    The source. Never returns null.

### getLocation

    public java.lang.String getLocation()

  Returns a description of the location of where this execption occurred.

  Returns:
    The location description. Never returns null.

### getLineNumber

    public java.lang.Integer getLineNumber()

  Returns the line in the script where this exception occurred, if known.

  Returns:
    The line number, or null if not known.

### getMessage

    public java.lang.String getMessage()

  Overrides:
    `getMessage` in class `java.lang.Throwable`

### getReportableException

    public GradleScriptException getReportableException()

  Returns the reportable exception for this failure. Usually, a {code GradleScriptException} is simply a wrapper around the actual failure. This method locates the actual failure in the cause chain of this exception. May return this exception.

  Returns:
    The reportable exception. Never returns null.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD