Prolog Cafe v1.2

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

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.IllegalDomainException
All Implemented Interfaces:
java.io.Serializable

public class IllegalDomainException
extends BuiltinException

Domain error.
There will be a domain error when the type of an argument is correct, but the value is outside the domain for which the procedure is defined.

See Also:
Serialized Form

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

DOMAIN_ERROR

public static SymbolTerm DOMAIN_ERROR
A functor symbol of domain_error/4.


domain

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


culprit

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

Constructor Detail

IllegalDomainException

public IllegalDomainException(java.lang.String _domain,
                              Term _culprit)
Constructs a new IllegalDomainException with a valid domain and its culprit.


IllegalDomainException

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

Method Detail

getMessageTerm

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

Overrides:
getMessageTerm in class BuiltinException

toString

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

Overrides:
toString in class java.lang.Throwable

Prolog Cafe v1.2

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