# Class ApfloatRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apfloat.ApfloatRuntimeException

All Implemented Interfaces:
  `Serializable, ApfloatLocalizedException`

Direct Known Subclasses:
  `ApfloatConfigurationException, ApfloatInternalException, ApfloatInterruptedException, NumericComputationException`

public class ApfloatRuntimeException extends RuntimeException implements ApfloatLocalizedException
Exception indicating some unexpected error situation. This exception can be thrown in different situations, for example:

- The result of an operation would have infinite size. For example, `new Apfloat(2).divide(new Apfloat(3))`, in radix 10.
- Overflow. If the exponent is too large to fit in a `long`, the situation can't be handled. Also, there is no "infinity" apfloat value that could be returned as the result.
- Total loss of precision. For example, `ApfloatMath.sin(new Apfloat(1e100))`. If the magnitude (100) is far greater than the precision (1) then the value of the `sin()` function can't be determined to any accuracy.
- Some other internal limitation.

Version:
  1.15.0
Author:
  Mikko Tommila
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApfloatRuntimeException()`
  Constructs a new apfloat runtime exception with an empty detail message.
  `ApfloatRuntimeException(String message)`
  Constructs a new apfloat runtime exception with the specified detail message.
  `ApfloatRuntimeException(String message, String localizationKey, Object... localizationArgs)`
  Constructs a new apfloat runtime exception with the specified detail message and localization data.
  `ApfloatRuntimeException(String message, Throwable cause)`
  Constructs a new apfloat runtime exception with the specified detail message and cause.
  `ApfloatRuntimeException(String message, Throwable cause, String localizationKey, Object... localizationArgs)`
  Constructs a new apfloat runtime exception with the specified detail message, cause and localization data.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object[]`
  `getLocalizationArgs()`
  Returns the localization arguments.
  `String`
  `getLocalizationKey()`
  Returns the localization key.
  `String`
  `getLocalizedMessage()`
  Returns the localized detail message.

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface ApfloatLocalizedException

  `getMessage`

- ## Constructor Details

  - ### ApfloatRuntimeException

    public ApfloatRuntimeException()
    Constructs a new apfloat runtime exception with an empty detail message.

  - ### ApfloatRuntimeException

    public ApfloatRuntimeException(String message)
    Constructs a new apfloat runtime exception with the specified detail message.
    Parameters:
      `message` - The detail message.

  - ### ApfloatRuntimeException

    public ApfloatRuntimeException(String message, Throwable cause)
    Constructs a new apfloat runtime exception with the specified detail message and cause.
    Parameters:
      `message` - The detail message.
      `cause` - Originating cause of the exception.

  - ### ApfloatRuntimeException

    public ApfloatRuntimeException(String message, String localizationKey, Object... localizationArgs)
    Constructs a new apfloat runtime exception with the specified detail message and localization data.
    Parameters:
      `message` - The detail message.
      `localizationKey` - The localization key.
      `localizationArgs` - The localization arguments.
    Since:
      1.15.0

  - ### ApfloatRuntimeException

    public ApfloatRuntimeException(String message, Throwable cause, String localizationKey, Object... localizationArgs)
    Constructs a new apfloat runtime exception with the specified detail message, cause and localization data.
    Parameters:
      `message` - The detail message.
      `cause` - Originating cause of the exception.
      `localizationKey` - The localization key.
      `localizationArgs` - The localization arguments.
    Since:
      1.15.0

- ## Method Details

  - ### getLocalizedMessage

    public String getLocalizedMessage()
    Description copied from interface: `ApfloatLocalizedException`
    Returns the localized detail message.
    Specified by:
      `getLocalizedMessage` in interface `ApfloatLocalizedException`
    Overrides:
      `getLocalizedMessage` in class `Throwable`
    Returns:
      The localized detail message.

  - ### getLocalizationKey

    public String getLocalizationKey()
    Returns the localization key.
    Specified by:
      `getLocalizationKey` in interface `ApfloatLocalizedException`
    Returns:
      The localization key.
    Since:
      1.15.0

  - ### getLocalizationArgs

    public Object[] getLocalizationArgs()
    Returns the localization arguments.
    Specified by:
      `getLocalizationArgs` in interface `ApfloatLocalizedException`
    Returns:
      The localization arguments.
    Since:
      1.15.0