csheets.ext.assertion
Class AssertionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by csheets.ext.assertion.AssertionException
All Implemented Interfaces:
Serializable

public class AssertionException
extends Exception

Representing a parse error of an assertion. Thrown by Assertion().

Author:
Fredrik Johansson, Peter Palotas
See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
AssertionException(antlr.CharStreamException cse)
           
AssertionException(int line, int column, String errorMsg)
           
AssertionException(antlr.MismatchedCharException ex)
           
AssertionException(antlr.MismatchedTokenException ex)
           
AssertionException(antlr.NoViableAltException ex)
           
AssertionException(antlr.NoViableAltForCharException ex)
           
AssertionException(antlr.RecognitionException re)
           
AssertionException(String errorMsg)
           
AssertionException(antlr.TokenStreamException tse)
           
 
Method Summary
 int getColumn()
          Returns the column of the assertion on which this error occured if hasLocationInfo() returns true.
 int getLine()
          Returns the line of the assertion on which this error occured if hasLocationInfo() returns true.
 String getMessage()
          Returns the message of this error.
 boolean hasLocationInfo()
          Returns true if this exception contains information about where in the assertion string the error occured, meaning getLine() and getColumn() will return correct values.
 String toString()
          Returns a message describing this error.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

AssertionException

public AssertionException(int line,
                          int column,
                          String errorMsg)

AssertionException

public AssertionException(String errorMsg)

AssertionException

public AssertionException(antlr.RecognitionException re)

AssertionException

public AssertionException(antlr.TokenStreamException tse)

AssertionException

public AssertionException(antlr.CharStreamException cse)

AssertionException

public AssertionException(antlr.MismatchedCharException ex)

AssertionException

public AssertionException(antlr.MismatchedTokenException ex)

AssertionException

public AssertionException(antlr.NoViableAltException ex)

AssertionException

public AssertionException(antlr.NoViableAltForCharException ex)
Method Detail

hasLocationInfo

public boolean hasLocationInfo()
Returns true if this exception contains information about where in the assertion string the error occured, meaning getLine() and getColumn() will return correct values. Returns false otherwise.


getLine

public int getLine()
Returns the line of the assertion on which this error occured if hasLocationInfo() returns true. Otherwise -1 will be returned.


getColumn

public int getColumn()
Returns the column of the assertion on which this error occured if hasLocationInfo() returns true. Otherwise -1 will be returned.


getMessage

public String getMessage()
Returns the message of this error.

Overrides:
getMessage in class Throwable

toString

public String toString()
Returns a message describing this error.

Overrides:
toString in class Throwable