Occurs when an attempt to coerce a
Numeric to a
Rat fails (due to a number with a nonzero imaginary part, for instance).
say (1+2i).Int;CATCH ;# OUTPUT: «X::Numeric::Real: Can not convert 1+2i to Int: imaginary part not zero␤»
method source(--> Numeric)
Returns the number that failed to coerce to Real.
Returns the type to which the coercion was attempted.
method reason(--> Str)
Returns the reason that the conversion failed.