org.apache.commons.math
Class FunctionEvaluationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.commons.math.MathException
              extended by org.apache.commons.math.FunctionEvaluationException
All Implemented Interfaces:
Serializable

public class FunctionEvaluationException
extends MathException

Exeption thrown when an error occurs evaluating a function.

Maintains an argument property holding the input value that caused the function evaluation to fail.

Version:
$Revision: 348519 $ $Date: 2005-11-23 12:12:18 -0700 (Wed, 23 Nov 2005) $
See Also:
Serialized Form

Constructor Summary
FunctionEvaluationException(double argument)
          Construct an exception indicating the argument value that caused the function evaluation to fail.
FunctionEvaluationException(double argument, String message)
          Construct an exception using the given argument and message text.
FunctionEvaluationException(double argument, String message, Throwable cause)
          Construct an exception with the given argument, message and root cause.
 
Method Summary
 double getArgument()
          Returns the function argument that caused this exception.
 
Methods inherited from class org.apache.commons.math.MathException
getCause, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionEvaluationException

public FunctionEvaluationException(double argument)
Construct an exception indicating the argument value that caused the function evaluation to fail. Generates an exception message of the form "Evaluation failed for argument = " + argument.

Parameters:
argument - the failing function argument

FunctionEvaluationException

public FunctionEvaluationException(double argument,
                                   String message)
Construct an exception using the given argument and message text. The message text of the exception will start with message and be followed by " Evaluation failed for argument = " + argument.

Parameters:
argument - the failing function argument
message - the exception message text

FunctionEvaluationException

public FunctionEvaluationException(double argument,
                                   String message,
                                   Throwable cause)
Construct an exception with the given argument, message and root cause. The message text of the exception will start with message and be followed by " Evaluation failed for argument = " + argument.

Parameters:
argument - the failing function argument
message - descriptive error message
cause - root cause.
Method Detail

getArgument

public double getArgument()
Returns the function argument that caused this exception.

Returns:
argument that caused function evaluation to fail


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