Prolog Cafe v1.2

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

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

public class SyntaxException
extends BuiltinException

Syntax error.
There will be a syntax error when a sequence of characters which are being input as read-term do not conform to the syntax.

See Also:
Serialized Form

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

SYNTAX_ERROR

public static SymbolTerm SYNTAX_ERROR
A functor symbol of syntax_error/5.


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.


message

public java.lang.String message
Holds a string representation of detail message.

Constructor Detail

SyntaxException

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


SyntaxException

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

Method Detail

getMessageTerm

public Term getMessageTerm()
Returns a term representation of this SyntaxException: syntax_error(goal,argNo,type,culprit,message).

Overrides:
getMessageTerm in class BuiltinException

toString

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

Overrides:
toString in class java.lang.Throwable

Prolog Cafe v1.2

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