gnu.jel
Class CompilationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by gnu.jel.CompilationException
All Implemented Interfaces:
Serializable

public class CompilationException
extends Exception

Represents an error encountered during the compilation.

The text of the messages can be changed/internationalized by modification of JEL.properties file

See Also:
Serialized Form

Field Summary
 int col
           
 
Constructor Summary
CompilationException(int code, Object param)
          Constructs new CompilationException with a single formatting parameter.
CompilationException(int code, Object[] params)
          Constructs new CompilationException with a several formatting parameter.
 
Method Summary
 int getColumn()
          Used to obtain the column, where error have occurred.
 String getMessage()
          Used to obtain the formatted error message.
 Object[] getParameters()
          Used to obtain the parameters for this error.
 int getType()
          Used to obtain the error code.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

col

public int col
Constructor Detail

CompilationException

public CompilationException(int code,
                            Object param)
Constructs new CompilationException with a single formatting parameter.

Parameters:
code - is the error code (must correspond to a message in JEL.properties file).
param - is the single Object parameter to be used in message formatting.

CompilationException

public CompilationException(int code,
                            Object[] params)
Constructs new CompilationException with a several formatting parameter.

Parameters:
code - is the error code (must correspond to a message in JEL.properties file).
params - is an array of Objects, which are to be used in message formatting.
Method Detail

getColumn

public int getColumn()
Used to obtain the column, where error have occurred.

Returns:
column, where error have occurred.

getType

public int getType()
Used to obtain the error code.

Returns:
the error code, corresponding to one of the messages in JEL.properties file.

getParameters

public Object[] getParameters()
Used to obtain the parameters for this error.

Returns:
the parameters to be used in message formatting, they provide further information about the error.

getMessage

public String getMessage()
Used to obtain the formatted error message.

Overrides:
getMessage in class Throwable
Returns:
the formatted error message.


Copyright © 1998-2009 Konstantin L. Metlov All Rights Reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the JEL manual.