justbytes._errors module

Exception types used by the justbytes class.

exception justbytes._errors.SizeError

Bases: exceptions.Exception

Generic Size error.

exception justbytes._errors.SizeFractionalResultError

Bases: justbytes._errors.SizeUnrepresentableResultError

Error when Size construction is strict.

exception justbytes._errors.SizeNonsensicalBinOpError(operator, other)

Bases: justbytes._errors.SizeNonsensicalOpError

Error when requesting a binary operation that doesn’t make sense.

exception justbytes._errors.SizeNonsensicalBinOpValueError(operator, other)

Bases: justbytes._errors.SizeNonsensicalOpError

Error when requesting a binary operation with a nonsense value.

exception justbytes._errors.SizeNonsensicalOpError

Bases: justbytes._errors.SizeUnsupportedOpError

Error when requesting an operation that doesn’t make sense.

exception justbytes._errors.SizePowerResultError

Bases: justbytes._errors.SizeUnrepresentableResultError

Error when requesting an operation that would yield a byte power.

exception justbytes._errors.SizeUnrepresentableResultError

Bases: justbytes._errors.SizeUnsupportedOpError

Error when requesting an operation that yields units that cannot be represented with Size, e.g., when multiplying a Size by a Size.

exception justbytes._errors.SizeUnsupportedOpError

Bases: justbytes._errors.SizeError

Error when executing unsupported operation on Size.

exception justbytes._errors.SizeValueError(value, param, msg=None)

Bases: justbytes._errors.SizeError

Raised when a parameter has an unacceptable value.

May also be raised when the parameter has an unacceptable type.

Previous topic

justbytes._constants module

Next topic

justbytes._size module

This Page