org.extex.ocpware.compiler.exception
Class SyntaxException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by org.extex.ocpware.exception.OcpException
                  extended by org.extex.ocpware.compiler.exception.SyntaxException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UnexpectedException

public class SyntaxException
extends OcpException

This exception class signals the occurrence of a syntax error.

Version:
$Revision: 6019 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Constructor Summary
protected SyntaxException()
          Creates a new object.
  SyntaxException(java.lang.CharSequence line, int lineno)
          Creates a new object.
  SyntaxException(int found, java.lang.CharSequence line, int lineno)
          Creates a new object.
  SyntaxException(int found, int expected, java.lang.CharSequence line, int lineno)
          Creates a new object.
 
Method Summary
 java.lang.String getLocalizedMessage()
          
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyntaxException

protected SyntaxException()
Creates a new object.


SyntaxException

public SyntaxException(java.lang.CharSequence line,
                       int lineno)
Creates a new object.

Parameters:
line - the current line up to the last character read
lineno - the number of the current line

SyntaxException

public SyntaxException(int found,
                       java.lang.CharSequence line,
                       int lineno)
Creates a new object.

Parameters:
found - the character found; negative values indicate EOF
line - the current line up to the last character read
lineno - the number of the current line

SyntaxException

public SyntaxException(int found,
                       int expected,
                       java.lang.CharSequence line,
                       int lineno)
Creates a new object.

Parameters:
found - the character found; negative values indicate EOF
expected - the expected character
line - the current line up to the last character read
lineno - the number of the current line
Method Detail

getLocalizedMessage

public java.lang.String getLocalizedMessage()

Overrides:
getLocalizedMessage in class OcpException
See Also:
Throwable.getLocalizedMessage()