Skip to content

# Codec errors

The preserves.error module exports various `Error` subclasses.

## `DecodeError`

Bases: `ValueError`

Raised whenever preserves.binary.Decoder or preserves.text.Parser detect invalid input.

## `EncodeError`

Bases: `ValueError`

Raised whenever preserves.binary.Encoder or preserves.text.Formatter are unable to proceed.

## `ShortPacket`

Bases: `DecodeError`

Raised whenever preserves.binary.Decoder or preserves.text.Parser discover that they want to read beyond the end of the currently-available input buffer in order to completely read an encoded value.

Last update: March 16, 2023
Created: March 16, 2023