Throw.onBadCast

Dst onBadCast(Dst, Src)(Src src)

Called automatically upon a bad cast (one that loses precision or attempts to convert a negative value to an unsigned type). The source type is Src and the destination type is Dst.

Parameters

srcsource operand

Returns

Nominally the result is the desired value of the cast operation,

which will be forwarded as the result of the cast. For Throw, the function never returns because it throws an exception.

Throws

CheckFailure on bad cast