Prolog Cafe v1.2

jp.ac.kobe_u.cs.prolog.lang
Class IllegalTypeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by jp.ac.kobe_u.cs.prolog.lang.PrologException
                  extended by jp.ac.kobe_u.cs.prolog.lang.BuiltinException
                      extended by jp.ac.kobe_u.cs.prolog.lang.IllegalTypeException
All Implemented Interfaces:
java.io.Serializable

public class IllegalTypeException
extends BuiltinException

Type error.
There will be a type error when the type of an argument or one of its components is incorrect, but not a variable.

See Also:
Serialized Form

Field Summary
 Term culprit
          Holds the argument or one of its components which caused the error.
 java.lang.String type
          Holds a string representation of valid type.
static SymbolTerm TYPE_ERROR
          A functor symbol of type_error/4.
 
Fields inherited from class jp.ac.kobe_u.cs.prolog.lang.BuiltinException
argNo, goal
 
Constructor Summary
IllegalTypeException(Predicate _goal, int _argNo, java.lang.String _type, Term _culprit)
          Constructs a new IllegalTypeException with the given arguments.
IllegalTypeException(java.lang.String _type, Term _culprit)
          Constructs a new IllegalTypeException with a valid type and its culprit.
 
Method Summary
 Term getMessageTerm()
          Returns a term representation of this IllegalTypeException: type_error(goal,argNo,type,culprit).
 java.lang.String toString()
          Returns a string representation of this IllegalTypeException.
 
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
 

Field Detail

TYPE_ERROR

public static SymbolTerm TYPE_ERROR
A functor symbol of type_error/4.


type

public java.lang.String type
Holds a string representation of valid type.


culprit

public Term culprit
Holds the argument or one of its components which caused the error.

Constructor Detail

IllegalTypeException

public IllegalTypeException(java.lang.String _type,
                            Term _culprit)
Constructs a new IllegalTypeException with a valid type and its culprit.


IllegalTypeException

public IllegalTypeException(Predicate _goal,
                            int _argNo,
                            java.lang.String _type,
                            Term _culprit)
Constructs a new IllegalTypeException with the given arguments.

Method Detail

getMessageTerm

public Term getMessageTerm()
Returns a term representation of this IllegalTypeException: type_error(goal,argNo,type,culprit).

Overrides:
getMessageTerm in class BuiltinException

toString

public java.lang.String toString()
Returns a string representation of this IllegalTypeException.

Overrides:
toString in class java.lang.Throwable

Prolog Cafe v1.2

Copyright (C) 1997-2008 M.BANBARA and N.TAMURA