Venice 0.751beta

nz.org.venice.parser
Class TypeMismatchException

java.lang.Object
  extended byjava.lang.Throwable
      extended bynz.org.venice.parser.ExpressionException
          extended bynz.org.venice.parser.TypeMismatchException
All Implemented Interfaces:
java.io.Serializable

public class TypeMismatchException
extends ExpressionException

An exception which is thrown when there is a type mismatch error when executing an expression. A type mismatch error is when an incorrect type was supplied. For example if the expression required a BOOLEAN_TYPE and a VALUE_TYPE was given instead.

See Also:
Expression, Serialized Form

Constructor Summary
TypeMismatchException()
          Create a new type mismatch exception.
TypeMismatchException(Expression expression, int type, int expectedType)
          Create a new type mismatch exception where the message text explains what caused the type mismatch.
TypeMismatchException(Expression expression, java.lang.String type, java.lang.String expectedTypes)
          Create a new type mismatch exception where the message text explains what caused the type mismatch.
 
Methods inherited from class nz.org.venice.parser.ExpressionException
getReason, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeMismatchException

public TypeMismatchException()
Create a new type mismatch exception.


TypeMismatchException

public TypeMismatchException(Expression expression,
                             java.lang.String type,
                             java.lang.String expectedTypes)
Create a new type mismatch exception where the message text explains what caused the type mismatch.

Parameters:
expression - The expression object which throws the exception
type - A string list where the items are the types of the expression.
expectedTypes - A string list where the items are the types the expected by the expression.

TypeMismatchException

public TypeMismatchException(Expression expression,
                             int type,
                             int expectedType)
Create a new type mismatch exception where the message text explains what caused the type mismatch.

Parameters:
expression - The expression object which throws the exception
type - The type of the expression.
expectedType - The type expected by the expression.

Venice 0.751beta