Groovy Documentation

org.gradle.api
[Java] Interface LocationAwareException


public interface LocationAwareException

A LocationAwareException is an exception which can be annotated with a location in a script. Note that most implementations of this interface are generated dynamically by an org.gradle.api.internal.ExceptionAnalyser.


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 exception occurred.

java.lang.String getMessage()

Returns the fully formatted error message, including the location.

java.lang.String getOriginalMessage()

Returns the undecorated message of this exception.

java.util.List getReportableCauses()

Returns the reportable causes for this failure.

ScriptSource getScriptSource()

Returns the source of the script where this exception occurred.

 

Method Detail

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.


getLocation

public java.lang.String getLocation()

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

Returns:
The location description. May return null.


getMessage

public java.lang.String getMessage()
Returns the fully formatted error message, including the location.
Returns:
the message. May return null.


getOriginalMessage

public java.lang.String getOriginalMessage()

Returns the undecorated message of this exception.

Returns:
The undecorated message. May return null.


getReportableCauses

public java.util.List getReportableCauses()
Returns the reportable causes for this failure.
Returns:
The causes. Never returns null, returns an empty list if this exception has no reportable causes.


getScriptSource

public ScriptSource getScriptSource()

Returns the source of the script where this exception occurred.

Returns:
The source. May return null.


 

Groovy Documentation