jmathlib.core.interpreter
Class Errors

java.lang.Object
  extended by jmathlib.core.interpreter.Errors

public class Errors
extends java.lang.Object

Class used to read and display error strings from a resource bundle


Constructor Summary
Errors()
           
 
Method Summary
static java.lang.String getErrorText(int errorCode)
          returns the localised error string for a specific code
static java.lang.String getErrorText(int errorCode, java.lang.Object[] params)
          returns the localised error string for a specific code, containing extra data fields
static void throwMathLibException(int errorCode)
          throws an exception with a localised error string
static void throwMathLibException(int errorCode, java.lang.Object[] params)
          throws an exception with a localised error string, containing extra data fields
static void throwMathLibException(java.lang.String errorMessage)
          Throws an exception with an error string.
static void throwParserException(java.lang.String errorMessage)
          Throws an exception with an error string.
static void throwUsageException(java.lang.String errorMessage)
          Throws an exception with an error string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Errors

public Errors()
Method Detail

getErrorText

public static java.lang.String getErrorText(int errorCode)
returns the localised error string for a specific code

Parameters:
errorCode - = the code for the error string
Returns:
the string containing the text

throwMathLibException

public static void throwMathLibException(int errorCode)
throws an exception with a localised error string

Parameters:
errorCode - = the code for the error string

throwMathLibException

public static void throwMathLibException(java.lang.String errorMessage)
Throws an exception with an error string. This methode should only be used by external functions. Internal classes should use localised error messages

Parameters:
errorCode - = the error message

throwParserException

public static void throwParserException(java.lang.String errorMessage)
Throws an exception with an error string. This method should only be used by Parser.java

Parameters:
errorMessage - = the parser error

throwUsageException

public static void throwUsageException(java.lang.String errorMessage)
Throws an exception with an error string. This method should only be used by Usage.java

Parameters:
errorMessage - = the parser error

getErrorText

public static java.lang.String getErrorText(int errorCode,
                                            java.lang.Object[] params)
returns the localised error string for a specific code, containing extra data fields

Parameters:
errorCode - = the code for the error string
params - = the extra data
Returns:
the string containing the text

throwMathLibException

public static void throwMathLibException(int errorCode,
                                         java.lang.Object[] params)
throws an exception with a localised error string, containing extra data fields

Parameters:
errorCode - = the code for the error string
params - = the extra data

FOOTER

BOTTOM