Top Description Fields Constructors Methods
org.codehaus.groovy.syntax

public Class SyntaxException

extends GroovyException
Class Inheritance
Known Direct Subclasses
org.codehaus.groovy.syntax.TokenException, groovy.transform.stc.IncorrectTypeHintException
Imports
org.codehaus.groovy.GroovyException, org.codehaus.groovy.ast.ASTNode

Base exception indicating a syntax error.

Field Summary

Modifier and TypeField and Description
private final int
private final int
private static final long
private String
private final int
startColumn

Column upon which the error occurred.

private final int
startLine

Line upon which the error occurred.

Constructor Summary

AccessConstructor and Description
public
public
SyntaxException(String message, int startLine, int startColumn)

public
SyntaxException(String message, int startLine, int startColumn, int endLine, int endColumn)

public
SyntaxException(String message, Throwable cause, int startLine, int startColumn)

public
SyntaxException(String message, Throwable cause, int startLine, int startColumn, int endLine, int endColumn)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the end column on which the error occurs
getEndColumn
()

public int

Returns:

the end line on which the error occurs
getEndLine
()

public int

Returns:

The line.
getLine
()

Retrieve the line upon which the error occurred.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.
public String
public String
public int

Returns:

The column.
getStartColumn
()

Retrieve the column upon which the error occurred.

public int

Returns:

the line on which the error occurs
getStartLine
()

public void
setSourceLocator(String sourceLocator)

Inherited from org.codehaus.groovy.GroovyException:
isFatalsetFatal

Field Detail

endColumnback to summary
private final int endColumn
endLineback to summary
private final int endLine
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.codehaus.groovy.GroovyException.serialVersionUID.

sourceLocatorback to summary
private String sourceLocator
startColumnback to summary
private final int startColumn

Column upon which the error occurred.

startLineback to summary
private final int startLine

Line upon which the error occurred.

Constructor Detail

SyntaxExceptionback to summary
public SyntaxException(String message, ASTNode node)
SyntaxExceptionback to summary
public SyntaxException(String message, int startLine, int startColumn)
SyntaxExceptionback to summary
public SyntaxException(String message, int startLine, int startColumn, int endLine, int endColumn)
SyntaxExceptionback to summary
public SyntaxException(String message, Throwable cause, int startLine, int startColumn)
SyntaxExceptionback to summary
public SyntaxException(String message, Throwable cause, int startLine, int startColumn, int endLine, int endColumn)

Method Detail

getEndColumnback to summary
public int getEndColumn()
Returns:int

the end column on which the error occurs

getEndLineback to summary
public int getEndLine()
Returns:int

the end line on which the error occurs

getLineback to summary
public int getLine()

Retrieve the line upon which the error occurred.

Returns:int

The line.

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

getOriginalMessageback to summary
public String getOriginalMessage()
getSourceLocatorback to summary
public String getSourceLocator()
getStartColumnback to summary
public int getStartColumn()

Retrieve the column upon which the error occurred.

Returns:int

The column.

getStartLineback to summary
public int getStartLine()
Returns:int

the line on which the error occurs

setSourceLocatorback to summary
public void setSourceLocator(String sourceLocator)