Groovy Documentation

## org.codehaus.groovy.syntax
[Java] Class SyntaxException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              org.codehaus.groovy.GroovyException
                  org.codehaus.groovy.syntax.SyntaxException

    public class SyntaxException
    extends GroovyException

Base exception indicating a syntax error.

Authors:
  bob mcwhirter

Version:
  \$Id\$

Constructor Summary
`SyntaxException(java.lang.String message, int startLine, int startColumn)`
`SyntaxException(java.lang.String message, int startLine, int startColumn, int endLine, int endColumn)`
`SyntaxException(java.lang.String message, java.lang.Throwable cause, int startLine, int startColumn)`
`SyntaxException(java.lang.String message, java.lang.Throwable cause, int startLine, int startColumn, int endLine, int endColumn)`

Method Summary
`int` | `getEndColumn()` @return the end column on which the error occurs
`int` | `getEndLine()` @return the end line on which the error occurs
`int` | `getLine()` Retrieve the line upon which the error occurred.
`java.lang.String` | `getMessage()`
`java.lang.String` | `getOriginalMessage()`
`java.lang.String` | `getSourceLocator()`
`int` | `getStartColumn()` Retrieve the column upon which the error occurred.
`int` | `getStartLine()` @return the line on which the error occurs
`void` | `setSourceLocator(java.lang.String sourceLocator)`

Methods inherited from class GroovyException
isFatal, setFatal

Methods inherited from class java.lang.Exception

java.lang.Exception#printStackTrace(), java.lang.Exception#printStackTrace(java.io.PrintStream), java.lang.Exception#printStackTrace(java.io.PrintWriter), java.lang.Exception#fillInStackTrace(), java.lang.Exception#getCause(), java.lang.Exception#initCause(java.lang.Throwable), java.lang.Exception#toString(), java.lang.Exception#getMessage(), java.lang.Exception#getLocalizedMessage(), java.lang.Exception#getStackTrace(), java.lang.Exception#setStackTrace([Ljava.lang.StackTraceElement;), java.lang.Exception#addSuppressed(java.lang.Throwable), java.lang.Exception#getSuppressed(), java.lang.Exception#wait(long), java.lang.Exception#wait(long, int), java.lang.Exception#wait(), java.lang.Exception#equals(java.lang.Object), java.lang.Exception#hashCode(), java.lang.Exception#getClass(), java.lang.Exception#notify(), java.lang.Exception#notifyAll()

Constructor Detail

### SyntaxException

    public SyntaxException(java.lang.String message, int startLine, int startColumn)

### SyntaxException

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

### SyntaxException

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

### SyntaxException

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

Method Detail

### getEndColumn

    public int getEndColumn()

  Returns:
    the end column on which the error occurs

### getEndLine

    public int getEndLine()

  Returns:
    the end line on which the error occurs

### getLine

    public int getLine()

  Retrieve the line upon which the error occurred.
  Returns:
    The line.

### getMessage

    public java.lang.String getMessage()

### getOriginalMessage

    public java.lang.String getOriginalMessage()

### getSourceLocator

    public java.lang.String getSourceLocator()

### getStartColumn

    public int getStartColumn()

  Retrieve the column upon which the error occurred.
  Returns:
    The column.

### getStartLine

    public int getStartLine()

  Returns:
    the line on which the error occurs

### setSourceLocator

    public void setSourceLocator(java.lang.String sourceLocator)

Groovy Documentation