class OverflowError

Overview

Raised when the result of an arithmetic operation is outside of the range that can be represented within the given operands types.

Int32::MAX + 1      # raises OverflowError (Arithmetic overflow)
Int32::MIN - 1      # raises OverflowError (Arithmetic overflow)
Float64::MAX.to_f32 # raises OverflowError (Arithmetic overflow)

Defined in:

perf_tools/mem_prof.cr

Class methods inherited from class Object

_fields_offsets _fields_offsets