org.codehaus.groovy.syntax
Class SyntaxException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.codehaus.groovy.GroovyException
              extended by org.codehaus.groovy.syntax.SyntaxException
All Implemented Interfaces:
java.io.Serializable, GroovyExceptionInterface
Direct Known Subclasses:
TokenException

public class SyntaxException
extends GroovyException

Base exception indicating a syntax error.

Version:
$Id: SyntaxException.java 14282 2008-12-05 12:38:03Z glaforge $
Author:
bob mcwhirter
See Also:
Serialized Form

Field Summary
private  int column
          Column upon which the error occurred.
private  int line
          Line upon which the error occurred.
private  java.lang.String sourceLocator
           
 
Constructor Summary
SyntaxException(java.lang.String message, int line, int column)
           
SyntaxException(java.lang.String message, java.lang.Throwable cause, int line, int column)
           
 
Method Summary
 int getEndColumn()
           
 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()
           
 void setSourceLocator(java.lang.String sourceLocator)
           
 
Methods inherited from class org.codehaus.groovy.GroovyException
isFatal, setFatal
 
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
 

Field Detail

line

private final int line
Line upon which the error occurred.


column

private final int column
Column upon which the error occurred.


sourceLocator

private java.lang.String sourceLocator
Constructor Detail

SyntaxException

public SyntaxException(java.lang.String message,
                       int line,
                       int column)

SyntaxException

public SyntaxException(java.lang.String message,
                       java.lang.Throwable cause,
                       int line,
                       int column)
Method Detail

setSourceLocator

public void setSourceLocator(java.lang.String sourceLocator)

getSourceLocator

public java.lang.String getSourceLocator()

getLine

public int getLine()
Retrieve the line upon which the error occurred.

Returns:
The line.

getStartColumn

public int getStartColumn()
Retrieve the column upon which the error occurred.

Returns:
The column.

getStartLine

public int getStartLine()
Returns:
the end of the line on which the error occurs

getEndColumn

public int getEndColumn()
Returns:
the end column on which the error occurs

getOriginalMessage

public java.lang.String getOriginalMessage()

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable


Copyright © ${year} The Codehaus. All Rights Reserved.