com.jp.comp.calculator
Class CalculatorException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.jp.comp.calculator.CalculatorException
All Implemented Interfaces:
java.io.Serializable

public class CalculatorException
extends java.lang.Exception

Calculator exception. Thrown by particular implementation of the calculator operation

See Also:
CalculatorOperation, Serialized Form

Field Summary
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
CalculatorException(java.lang.String anErrMsg)
          Constructs the class with specified error message
CalculatorException(java.lang.String anErrMsg, java.lang.Object[] aParams)
          Constructs the class with specified error message and message parameters to be substituted by MessageFormat
 
Method Summary
protected static java.lang.String formatMessage(java.lang.String aMsg, java.lang.Object[] aParams)
          Formats the message
 
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
 

Constructor Detail

CalculatorException

public CalculatorException(java.lang.String anErrMsg)
Constructs the class with specified error message

Parameters:
anErrMsg - error message

CalculatorException

public CalculatorException(java.lang.String anErrMsg,
                           java.lang.Object[] aParams)
Constructs the class with specified error message and message parameters to be substituted by MessageFormat

Parameters:
anErrMsg - error message
aParams - message parameters
Method Detail

formatMessage

protected static java.lang.String formatMessage(java.lang.String aMsg,
                                                java.lang.Object[] aParams)
Formats the message

Parameters:
aMsg - the message
aParams - message parameters
Returns:
formatted message