org.apache.commons.math3.exception

## Class MathIllegalNumberException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - java.lang.IllegalArgumentException
        - - org.apache.commons.math3.exception.MathIllegalArgumentException
          - - org.apache.commons.math3.exception.MathIllegalNumberException

- All Implemented Interfaces:
    Serializable, ExceptionContextProvider
  Direct Known Subclasses:
    DimensionMismatchException, NonMonotonicSequenceException, NotANumberException, NotFiniteNumberException, NumberIsTooLargeException, NumberIsTooSmallException, OutOfRangeException, ZeroException

      public class MathIllegalNumberException
      extends MathIllegalArgumentException

  Base class for exceptions raised by a wrong number. This class is not intended to be instantiated directly: it should serve as a base class to create all the exceptions that are raised because some precondition is violated by a number argument.
  Since:
    2.2
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Integer` | `INTEGER_ZERO` Helper to avoid boxing warnings.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `MathIllegalNumberException(Localizable pattern, Number wrong, Object... arguments)` Construct an exception.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Number` | `getArgument()`

    - ### Methods inherited from class org.apache.commons.math3.exception.MathIllegalArgumentException

      `getContext, getLocalizedMessage, getMessage`

    - ### Methods inherited from class java.lang.Throwable

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

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### INTEGER_ZERO

          protected static final Integer INTEGER_ZERO

      Helper to avoid boxing warnings. @since 3.3

  - ### Constructor Detail

    - #### MathIllegalNumberException

          protected MathIllegalNumberException(Localizable pattern,
                                    Number wrong,
                                    Object... arguments)

      Construct an exception.
      Parameters:
        `pattern` - Localizable pattern.
        `wrong` - Wrong number.
        `arguments` - Arguments.

  - ### Method Detail

    - #### getArgument

          public Number getArgument()

      Returns:
        the requested value.

Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.