Prolog Cafe v1.2

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

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

public class JavaException
extends BuiltinException

Java error.
There will be a Java error when a Java exception is threw during interoperating with Java in Prolog Cafe. The class JavaException wraps a subclass of java.lang.Exception.

See Also:
Serialized Form

Field Summary
 java.lang.Exception e
          Holds a Java exception.
static SymbolTerm JAVA_ERROR
          A functor symbol of java_error/3.
 
Fields inherited from class jp.ac.kobe_u.cs.prolog.lang.BuiltinException
argNo, goal
 
Constructor Summary
JavaException(java.lang.Exception _e)
          Constructs a new JavaException with a Java exception.
JavaException(Predicate _goal, int _argNo, java.lang.Exception _e)
          Constructs a new JavaException with the given arguments.
 
Method Summary
 java.lang.Exception getException()
          Returns a underlying Java exception.
 Term getMessageTerm()
          Returns a term representation of this JavaException: java_error(goal,argNo,exception).
 java.lang.String toString()
          Returns a string representation of this JavaException.
 
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

JAVA_ERROR

public static SymbolTerm JAVA_ERROR
A functor symbol of java_error/3.


e

public java.lang.Exception e
Holds a Java exception.

Constructor Detail

JavaException

public JavaException(java.lang.Exception _e)
Constructs a new JavaException with a Java exception.


JavaException

public JavaException(Predicate _goal,
                     int _argNo,
                     java.lang.Exception _e)
Constructs a new JavaException with the given arguments.

Method Detail

getMessageTerm

public Term getMessageTerm()
Returns a term representation of this JavaException: java_error(goal,argNo,exception).

Overrides:
getMessageTerm in class BuiltinException

getException

public java.lang.Exception getException()
Returns a underlying Java exception.


toString

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

Overrides:
toString in class java.lang.Throwable

Prolog Cafe v1.2

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