is Exception
Occurs when an attempt to coerce an Inf
or a NaN
to a Numeric
type.
For example
say Inf.Int;CATCH ;# OUTPUT: «X::Numeric::CannotConvert: Cannot convert Inf to Int»
Most other conversion errors throw X::Numeric::Real
.
Methods§
method source§
method source()
Returns the value that failed to coerce.
method target§
method target()
Returns the type to which the coercion was attempted.
method reason§
method reason(--> Str)
Returns the reason that the conversion failed.