Package org.hipparchus.exception
Class MathRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.hipparchus.exception.MathRuntimeException
- All Implemented Interfaces:
Serializable
,LocalizedException
- Direct Known Subclasses:
MathIllegalArgumentException
,MathIllegalStateException
All exceptions thrown by the Hipparchus code inherit from this class.
- See Also:
-
Constructor Summary
ConstructorDescriptionMathRuntimeException
(Throwable cause, Localizable specifier, Object... parts) Simple constructor.MathRuntimeException
(Localizable specifier, Object... parts) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic MathRuntimeException
Create an exception for an internal error.static MathRuntimeException
createInternalError
(Throwable cause) Create an exception for an internal error.getMessage
(Locale locale) Gets the message in a specified locale.Object[]
getParts()
Get the variable parts of the error message.Get the localizable specifier of the error message.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MathRuntimeException
Simple constructor.- Parameters:
specifier
- format specifier (to be translated).parts
- parts to insert in the format (no translation).
-
MathRuntimeException
Simple constructor.- Parameters:
cause
- root cause.specifier
- format specifier (to be translated).parts
- parts to insert in the format (no translation).
-
-
Method Details
-
createInternalError
Create an exception for an internal error.- Returns:
- a new runtime exception indicating an internal error
-
createInternalError
Create an exception for an internal error.- Parameters:
cause
- root cause- Returns:
- a new runtime exception, indicating an internal error and wrapping the given throwable
-
getMessage
Gets the message in a specified locale.- Specified by:
getMessage
in interfaceLocalizedException
- Parameters:
locale
- Locale in which the message should be translated- Returns:
- localized message
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getLocalizedMessage
- Overrides:
getLocalizedMessage
in classThrowable
-
getSpecifier
Get the localizable specifier of the error message.- Specified by:
getSpecifier
in interfaceLocalizedException
- Returns:
- localizable specifier of the error message
-
getParts
Get the variable parts of the error message.- Specified by:
getParts
in interfaceLocalizedException
- Returns:
- a copy of the variable parts of the error message
-