Class FractionException

All Implemented Interfaces:
Serializable

class FractionException extends ArithmeticException
Package private exception class with constants for frequently used messages.
  • Field Details

    • ERROR_CONVERSION_OVERFLOW

      static final String ERROR_CONVERSION_OVERFLOW
      Error message for overflow during conversion.
      See Also:
    • ERROR_CONVERSION

      static final String ERROR_CONVERSION
      Error message when iterative conversion fails.
      See Also:
    • ERROR_ZERO_DENOMINATOR

      static final String ERROR_ZERO_DENOMINATOR
      Error message for zero-valued denominator.
      See Also:
    • ERROR_DIVIDE_BY_ZERO

      static final String ERROR_DIVIDE_BY_ZERO
      Error message for divide by zero.
      See Also:
    • serialVersionUID

      private static final long serialVersionUID
      Serializable version identifier.
      See Also:
  • Constructor Details

    • FractionException

      FractionException(String message, Object... formatArguments)
      Create an exception where the message is constructed by applying String.format(String, Object...).
      Parameters:
      message - the exception message format string
      formatArguments - the arguments for formatting the message
    • FractionException

      FractionException(String message)
      Create an exception with the specified message.
      Parameters:
      message - the exception message