Thrown when a mathematical operation caused a number to overflow from its bounds, or when a numeric narrowing conversion fails because the number cannot be represented within the bounds of the narrower type.

Note that:

  • arithmetic operations on Integers result in silent overflow (JVM) or loss of precision (JavaScript), and thus never result in an OverflowException, and,
  • likewise, arithmetic operations on Float produce the value infinity instead of overflowing.

no subtypes hierarchy

Initializer
OverflowException(String message = ...)
Parameters:
  • message = "Numeric overflow"
Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Throwable
Inherited Methods
Methods inherited from: Object
Methods inherited from: Throwable