Top Description Fields Constructors Methods
org.apache.commons.math3.exception

public Class MathRuntimeException

extends RuntimeException
implements ExceptionContextProvider
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.exception.util.ExceptionContextProvider
Imports
org.apache.commons.math3.exception.util.Localizable, .ExceptionContext, .ExceptionContextProvider

As of release 4.0, all exceptions thrown by the Commons Math code (except NullArgumentException) inherit from this class. In most cases, this class should not be instantiated directly: it should serve as a base class for implementing exception classes that describe a specific "problem".
Since
3.1

Field Summary

Modifier and TypeField and Description
private final ExceptionContext
context

Context.

private static final long

Constructor Summary

AccessConstructor and Description
public
MathRuntimeException(Localizable
Message pattern explaining the cause of the error.
pattern
,
Object...
Arguments.
args
)

Method Summary

Modifier and TypeMethod and Description
public ExceptionContext
getContext()

Implements org.apache.commons.math3.exception.util.ExceptionContextProvider.getContext.

Gets a reference to the "rich context" data structure that allows to customize error messages and store key, value pairs in exceptions.

public String
getLocalizedMessage()

Overrides java.lang.Throwable.getLocalizedMessage.

Creates a localized description of this throwable.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Field Detail

contextback to summary
private final ExceptionContext context

Context.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Serializable version Id.

Constructor Detail

MathRuntimeExceptionback to summary
public MathRuntimeException(Localizable pattern, Object... args)
Parameters
pattern:Localizable

Message pattern explaining the cause of the error.

args:Object[]

Arguments.

Method Detail

getContextback to summary
public ExceptionContext getContext()

Implements org.apache.commons.math3.exception.util.ExceptionContextProvider.getContext.

Doc from org.apache.commons.math3.exception.util.ExceptionContextProvider.getContext.

Gets a reference to the "rich context" data structure that allows to customize error messages and store key, value pairs in exceptions.

Returns:ExceptionContext

a reference to the exception context.

getLocalizedMessageback to summary
public String getLocalizedMessage()

Overrides java.lang.Throwable.getLocalizedMessage.

Doc from java.lang.Throwable.getLocalizedMessage.

Creates a localized description of this throwable. Subclasses may override this method in order to produce a locale-specific message. For subclasses that do not override this method, the default implementation returns the same result as getMessage().

Returns:String

The localized description of this throwable.

Annotations
@Override
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override