2023-03-16 23:07:27 +00:00
|
|
|
"""The [preserves.error][] module exports various `Error` subclasses."""
|
2023-03-16 16:51:19 +00:00
|
|
|
|
|
|
|
class DecodeError(ValueError):
|
2023-03-16 23:07:27 +00:00
|
|
|
"""Raised whenever [preserves.binary.Decoder][] or [preserves.text.Parser][] detect invalid
|
|
|
|
input."""
|
2023-03-16 16:51:19 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
class EncodeError(ValueError):
|
2023-03-16 23:07:27 +00:00
|
|
|
"""Raised whenever [preserves.binary.Encoder][] or [preserves.text.Formatter][] are unable to proceed."""
|
2023-03-16 16:51:19 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
class ShortPacket(DecodeError):
|
2023-03-16 23:07:27 +00:00
|
|
|
"""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."""
|
2023-03-16 16:51:19 +00:00
|
|
|
pass
|