org.apache.commons.nabla.core
Class NablaException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.commons.nabla.core.NablaException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DifferentiationException

public class NablaException
extends Exception

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

When the nabla classes throw exceptions that are specific to the package, these exceptions are always subclasses of NablaException. 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 nabla specific ones.

Version:
$Id: nablaException.java 1686 2005-12-16 12:59:51Z luc $
See Also:
Serialized Form

Constructor Summary
NablaException(String specifier, Object... parts)
          Simple constructor.
 
Method Summary
static String translate(String s)
          Translate a string.
static String translate(String specifier, Object... 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

NablaException

public NablaException(String specifier,
                      Object... 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)
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,
                               Object... parts)
Translate a message.

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


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.