org.spaceroots.mantissa
Class MantissaException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.spaceroots.mantissa.MantissaException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CardanEulerSingularityException, CostException, DerivativeException, EstimationException, ExhaustedSampleException, FunctionException, IntegratorException, NoConvergenceException, NotARotationMatrixException, NotPositiveDefiniteMatrixException, SingularMatrixException

public class MantissaException
extends Exception

This class is the base class for all specific exceptions thrown by the mantissa classes.

When the mantissa classes throw exceptions that are specific to the package, these exceptions are always subclasses of MantissaException. When exceptions that are already covered by the standard java API should be thrown, like ArrayIndexOutOfBoundsException or IllegalArgumentException, these standard exceptions are thrown rather than the mantissa specific ones.

Version:
$Id: MantissaException.java 1686 2005-12-16 12:59:51Z luc $
Author:
L. Maisonobe
See Also:
Serialized Form

Constructor Summary
MantissaException()
          Simple constructor.
MantissaException(String message)
          Simple constructor.
MantissaException(String specifier, String[] parts)
          Simple constructor.
MantissaException(String specifier, String[] parts, Throwable cause)
          Simple constructor.
MantissaException(String message, Throwable cause)
          Simple constructor.
MantissaException(Throwable cause)
          Simple constructor.
 
Method Summary
static String translate(String s)
          Translate a string.
static String translate(String specifier, String[] parts)
          Translate a 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

MantissaException

public MantissaException()
Simple constructor. Build an exception with an empty message


MantissaException

public MantissaException(String message)
Simple constructor. Build an exception by translating the specified message

Parameters:
message - message to translate

MantissaException

public MantissaException(String specifier,
                         String[] parts)
Simple constructor. Build an exception by translating and formating a message

Parameters:
specifier - format specifier (to be translated)
parts - to insert in the format (no translation)

MantissaException

public MantissaException(Throwable cause)
Simple constructor. Build an exception from a cause

Parameters:
cause - cause of this exception

MantissaException

public MantissaException(String message,
                         Throwable cause)
Simple constructor. Build an exception from a message and a cause

Parameters:
message - message to translate
cause - cause of this exception

MantissaException

public MantissaException(String specifier,
                         String[] parts,
                         Throwable cause)
Simple constructor. Build an exception from a message and a cause

Parameters:
specifier - format specifier (to be translated)
parts - to insert in the format (no translation)
cause - cause of this exception
Method Detail

translate

public static String translate(String s)
Translate a string.

Parameters:
s - string to translate
Returns:
translated string

translate

public static String translate(String specifier,
                               String[] parts)
Translate a message.

Parameters:
specifier - format specifier (to be translated)
parts - to insert in the format (no translation)
Returns:
translated message


Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.