Source code for baudot.exceptions


"""
Custom exceptions for the Baudot library
"""


[docs]class BaudotException(Exception): """Core exception class for this library"""
[docs]class IncoherentTable(BaudotException): """Raised when an encoding/decoding table is not valid"""
[docs]class DecodingError(BaudotException): """Raised on decoding error"""
[docs]class EncodingError(BaudotException): """Raised on encoding error"""
[docs]class ReadError(BaudotException): """Raised when reading a 5-bit stream fails"""
[docs]class WriteError(BaudotException): """Raised when writing a 5-bit stream fails"""