CiaoJava
Class PLException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--CiaoJava.PLException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PLGoalException

public class PLException
extends java.lang.Exception

This class implements the exceptions that can be thrown using the CiaoJava package, and translates the exceptions received from the Prolog side.

See Also:
Serialized Form

Constructor Summary
PLException()
          Creates a new PLException with no description.
PLException(java.lang.String s)
          Creates a new PLException with the description given as argument.
 
Method Summary
static PLException translateException(PLTerm prologException)
          Translated a Prolog exception represented as a term in a Java PLException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PLException

public PLException()
Creates a new PLException with no description.

PLException

public PLException(java.lang.String s)
Creates a new PLException with the description given as argument.
Parameters:
s - String that contains the description of the exception.
Method Detail

translateException

public static PLException translateException(PLTerm prologException)
Translated a Prolog exception represented as a term in a Java PLException.
Parameters:
prologException - PLTerm object that represents the Prolog exception.
Returns:
PLException object with the Java exception representing the Prolog exception.