steenzout.barcode.errors module

Exceptions module.

exception BarcodeError(msg)[source]

Bases: exceptions.Exception

Base class for steenzout.barcode exceptions.

__str__()[source]

Returns a string representation of this object.

Returns:string representation of this object.
Return type:(str)
exception BarcodeNotFoundError(name)[source]

Bases: steenzout.barcode.errors.BarcodeError

Raised when an unknown barcode is requested.

exception IllegalCharacterError(allowed)[source]

Bases: steenzout.barcode.errors.BarcodeError

Raised when a bar code contains illegal characters.

exception NumberOfDigitsError(msg)[source]

Bases: steenzout.barcode.errors.BarcodeError

Raised when the number of digits do not match.

exception WrongCountryCodeError(country)[source]

Bases: steenzout.barcode.errors.BarcodeError

Raised when a JAN (Japan Article Number) doesn’t start with 450-459 or 490-499.