com.ftlabs.fisa.calc
Class CalculationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ftlabs.fisa.calc.CalculationException
All Implemented Interfaces:
java.io.Serializable

public class CalculationException
extends java.lang.Exception

The root Exception for all calculation exceptions.

See Also:
Serialized Form

Field Summary
protected  int errorCode
           
 
Constructor Summary
CalculationException(int errorCode)
          Creates a new instance of CalculationException with the specified errorCode.
CalculationException(int errorCode, java.lang.String message)
          Constructs an instance of CalculationException with the specified errorCode and detail message.
CalculationException(int errorCode, java.lang.String message, java.lang.Throwable cause)
          Constructs an instance of CalculationException with the specified errorCode, detail message, and cause.
CalculationException(java.lang.String message, java.lang.Throwable cause)
          Constructs an instance of CalculationException with the specified detail message and cause.
 
Method Summary
static CalculationException create(java.lang.String name)
          Create a new CalculationException as defined inside errorcodes.properties for the provided name.
static CalculationException create(java.lang.String name, java.lang.String message)
          Create a new CalculationException as defined inside errorcodes.properties for the provided name.
 int getErrorCode()
          Get the errorCode for this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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
 

Field Detail

errorCode

protected int errorCode
Constructor Detail

CalculationException

public CalculationException(int errorCode)
Creates a new instance of CalculationException with the specified errorCode.

Parameters:
errorCode - The error code.

CalculationException

public CalculationException(int errorCode,
                            java.lang.String message)
Constructs an instance of CalculationException with the specified errorCode and detail message.

Parameters:
errorCode - The error code.
message - the detail message.

CalculationException

public CalculationException(java.lang.String message,
                            java.lang.Throwable cause)
Constructs an instance of CalculationException with the specified detail message and cause.

Parameters:
message - the detail message.
cause - the cause.

CalculationException

public CalculationException(int errorCode,
                            java.lang.String message,
                            java.lang.Throwable cause)
Constructs an instance of CalculationException with the specified errorCode, detail message, and cause.

Parameters:
errorCode - the errorCode.
message - the detail message.
cause - the cause.
Method Detail

create

public static CalculationException create(java.lang.String name)
Create a new CalculationException as defined inside errorcodes.properties for the provided name.

Parameters:
name - The name of a CalculationException as defined in errorcodes.properties.
Returns:
A new CalculationException.

create

public static CalculationException create(java.lang.String name,
                                          java.lang.String message)
Create a new CalculationException as defined inside errorcodes.properties for the provided name.

Parameters:
name - The name of a CalculationException as defined in errorcodes.properties.
message - A message to be appended to the predefined message.
Returns:
A new CalculationException.

getErrorCode

public int getErrorCode()
Get the errorCode for this exception.

Returns:
the errorCode for this exception.