Class MathRuntimeException

All Implemented Interfaces:
Serializable, LocalizedException
Direct Known Subclasses:
Euclidean1D.NoSubSpaceException, MathArithmeticException, MathIllegalArgumentException, MathIllegalStateException, MathUnsupportedOperationException, Sphere1D.NoSubSpaceException

public class MathRuntimeException extends RuntimeException implements LocalizedException
All exceptions thrown by the Hipparchus code inherit from this class.
See Also:
  • Constructor Details

    • MathRuntimeException

      public MathRuntimeException(Localizable specifier, Object... parts)
      Simple constructor.
      Parameters:
      specifier - format specifier (to be translated).
      parts - parts to insert in the format (no translation).
    • MathRuntimeException

      public MathRuntimeException(Throwable cause, Localizable specifier, Object... parts)
      Simple constructor.
      Parameters:
      cause - root cause.
      specifier - format specifier (to be translated).
      parts - parts to insert in the format (no translation).
  • Method Details

    • createInternalError

      public static MathRuntimeException createInternalError()
      Create an exception for an internal error.
      Returns:
      a new runtime exception indicating an internal error
    • createInternalError

      public static MathRuntimeException createInternalError(Throwable cause)
      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

      public String getMessage(Locale locale)
      Gets the message in a specified locale.
      Specified by:
      getMessage in interface LocalizedException
      Parameters:
      locale - Locale in which the message should be translated
      Returns:
      localized message
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getLocalizedMessage

      public String getLocalizedMessage()
      Overrides:
      getLocalizedMessage in class Throwable
    • getSpecifier

      public Localizable getSpecifier()
      Get the localizable specifier of the error message.
      Specified by:
      getSpecifier in interface LocalizedException
      Returns:
      localizable specifier of the error message
    • getParts

      public Object[] getParts()
      Get the variable parts of the error message.
      Specified by:
      getParts in interface LocalizedException
      Returns:
      a copy of the variable parts of the error message