csheets.core
Class IllegalValueTypeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by csheets.core.IllegalValueTypeException
All Implemented Interfaces:
Serializable

public class IllegalValueTypeException
extends Exception

An exception that is thrown when an illegal value is encountered.

Author:
Einar Pehrson
See Also:
Serialized Form

Constructor Summary
IllegalValueTypeException(Value value, Value.Type expectedValueType)
          Creates a new illegal value type exception.
 
Method Summary
 Value.Type getExpectedValueType()
          Returns the expected type of the value.
 String getMessage()
          Returns a message describing the exception.
 Value getValue()
          Returns the value.
 String toString()
          Returns a string representation of the exception.
 
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
 

Constructor Detail

IllegalValueTypeException

public IllegalValueTypeException(Value value,
                                 Value.Type expectedValueType)
Creates a new illegal value type exception.

Parameters:
value - the value
expectedValueType - the expected type of the value
Method Detail

getValue

public Value getValue()
Returns the value.

Returns:
the value

getExpectedValueType

public Value.Type getExpectedValueType()
Returns the expected type of the value.

Returns:
the expected type of the value

getMessage

public String getMessage()
Returns a message describing the exception.

Overrides:
getMessage in class Throwable
Returns:
a message describing the exception

toString

public String toString()
Returns a string representation of the exception.

Overrides:
toString in class Throwable
Returns:
a string representation of the exception