5.16.2 FixedPoint Exceptions

FixedPoint objects can raise the following exceptions:

exception TypeError("can't convert complex to FixedPoint...")
Exception raised during instantiation when a complex number is passed to FixedPoint as the initial value. FixedPoint cannot convert complex numbers. Exception string includes the complex number passed as the initial value.

exception TypeError("can't convert to FixedPoint:...")
Exception raised during instantiation when an initial value is passed to FixedPoint that cannot be coerced into a float or int. Exception string includes the number passed as the initial value.

exception TypeError("precision not convertable to int:...")
Exception raised by set_precision() when the value of the precision argument could not be coerced into an integer. Exception string includes the value passed as the precision.

exception ValueError("precision must be >= 0:...")
Exception raised by set_precision() when the value of the precision argument is less than 0. Exception string includes the value passed as the precision.

exception ZeroDivisionError("FixedPoint division")
Exception raised during a FixedPoint division operation when the value of the divisor is 0.

exception ZeroDivisionError("FixedPoint modulo")
Exception raised during a FixedPoint divmod() operation when the value of the divisor is 0.

exception ValueError("can't parse as number:...")
Exception raised during a FixedPoint operation when a string passed as a value cannot be converted into a numeric value. Exception string includes the string passed as the value.

See About this document... for information on suggesting changes.