Class MathIllegalStateException

All Implemented Interfaces:
Serializable, MathThrowable
Direct Known Subclasses:
ConvergenceException, MathInternalError, NoDataException

public class MathIllegalStateException extends IllegalStateException implements MathThrowable
Base class for all exceptions that signal a mismatch between the current state and the user's expectations.
Since:
2.2
See Also:
  • Constructor Details

    • MathIllegalStateException

      public MathIllegalStateException(Localizable specific, Localizable general, Object... args)
      Simple constructor.
      Parameters:
      specific - Message pattern providing the specific context of the error.
      general - Message pattern explaining the cause of the error.
      args - Arguments.
    • MathIllegalStateException

      public MathIllegalStateException(Throwable cause, Localizable specific, Localizable general, Object... args)
      Simple constructor.
      Parameters:
      cause - root cause
      specific - Message pattern providing the specific context of the error.
      general - Message pattern explaining the cause of the error.
      args - Arguments.
    • MathIllegalStateException

      public MathIllegalStateException(Localizable general, Object... args)
      Parameters:
      general - Message pattern explaining the cause of the error.
      args - Arguments.
    • MathIllegalStateException

      public MathIllegalStateException(Throwable cause, Localizable general, Object... args)
      Simple constructor.
      Parameters:
      cause - root cause
      general - Message pattern explaining the cause of the error.
      args - Arguments.
  • Method Details

    • getSpecificPattern

      public Localizable getSpecificPattern()
      Gets the localizable pattern used to build the specific part of the message of this throwable.
      Specified by:
      getSpecificPattern in interface MathThrowable
      Returns:
      localizable pattern used to build the specific part of the message of this throwable
    • getGeneralPattern

      public Localizable getGeneralPattern()
      Gets the localizable pattern used to build the general part of the message of this throwable.
      Specified by:
      getGeneralPattern in interface MathThrowable
      Returns:
      localizable pattern used to build the general part of the message of this throwable
    • getArguments

      public Object[] getArguments()
      Gets the arguments used to build the message of this throwable.
      Specified by:
      getArguments in interface MathThrowable
      Returns:
      the arguments used to build the message of this throwable
    • getMessage

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

      public String getMessage()
      Gets the message in a conventional US locale.
      Specified by:
      getMessage in interface MathThrowable
      Overrides:
      getMessage in class Throwable
      Returns:
      localized message
    • getLocalizedMessage

      public String getLocalizedMessage()
      Gets the message in the system default locale.
      Specified by:
      getLocalizedMessage in interface MathThrowable
      Overrides:
      getLocalizedMessage in class Throwable
      Returns:
      localized message