toIntExact

open fun toIntExact(value: Long): Int(source)

Returns the value of the long argument, throwing an exception if the value overflows an int.

Return

the argument as an int

Parameters

value

the long value

Throws

if the argument overflows an int