marf.nlp.Parsing
Class CompilerError

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bymarf.util.MARFException
              extended bymarf.nlp.NLPException
                  extended bymarf.nlp.Parsing.CompilerError
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LexicalError, SemanticError, SyntaxError

public class CompilerError
extends NLPException

Generic Compiler Error. Normally subclassed to differentiate between various error types like lexical, syntax, semantic and such.

$Id: CompilerError.java,v 1.16 2006/01/15 20:51:55 mokhov Exp $

Since:
0.3.0.2
Version:
$Revision: 1.16 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
protected  int iCurrentErrorCode
          Error code of the last error occured.
protected  int iLineNo
          Line number where the given error occurred.
static int OK
          Error code signifying "no error".
 
Fields inherited from class marf.util.MARFException
strMessage
 
Constructor Summary
CompilerError()
          Default Constructor.
CompilerError(java.lang.Exception poException)
          Wraps the parameter exception into CompilerError.
CompilerError(java.lang.String pstrMessage)
          Creates a CompilerError with a custom error message string.
CompilerError(java.lang.String pstrMessage, java.lang.Exception poException)
          Wraps the parameter exception into CompilerError with a custom error message string.
 
Method Summary
 int getCurrentErrorCode()
          Access method for the current error code property.
 int getLineNo()
          Access method for the line number property.
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 
Methods inherited from class marf.util.MARFException
getMessage, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

OK

public static final int OK
Error code signifying "no error".

Since:
October 2, 2001
See Also:
Constant Field Values

iCurrentErrorCode

protected int iCurrentErrorCode
Error code of the last error occured.

Since:
October 2, 2001

iLineNo

protected int iLineNo
Line number where the given error occurred. The default value of (-1) means it was not yet initialized.

Since:
October 2, 2001
Constructor Detail

CompilerError

public CompilerError()
Default Constructor.

Since:
October 2, 2001

CompilerError

public CompilerError(java.lang.Exception poException)
Wraps the parameter exception into CompilerError.

Parameters:
poException - the exception object to wrap

CompilerError

public CompilerError(java.lang.String pstrMessage)
Creates a CompilerError with a custom error message string.

Parameters:
pstrMessage - the custom error message

CompilerError

public CompilerError(java.lang.String pstrMessage,
                     java.lang.Exception poException)
Wraps the parameter exception into CompilerError with a custom error message string.

Parameters:
pstrMessage - the custom error message
poException - the exception object to wrap
Method Detail

getCurrentErrorCode

public int getCurrentErrorCode()
Access method for the current error code property.

Returns:
the current value of the iCurrentErrorCode property

getLineNo

public int getLineNo()
Access method for the line number property.

Returns:
the current value of the iLineNo property

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string


SourceForge Logo