12.3.5 mimelib exception classes

The following exception classes are defined in the mimelib.Errors module:

MessageError ()
This is the base class for all exceptions that the mimelib package can raise. It is derived from the standard Exception class and defines no additional methods.

MessageParseError ()
This is the base class for exceptions thrown by the Parser class. It is derived from MessageError.

HeaderParseError ()
Raised under some error conditions when parsing the RFC 822 headers of a message, this class is derived from MessageParseError. It can be raised from the Parser.parse() or Parser.parsestr() methods.

Situations where it can be raised include finding a ``Unix-From'' header after the first RFC 822 header of the message, finding a continuation line before the first RFC 822 header is found, or finding a line in the headers which is neither a header or a continuation line.

BoundaryError ()
Raised under some error conditions when parsing the RFC 822 headers of a message, this class is derived from MessageParseError. It can be raised from the Parser.parse() or Parser.parsestr() methods.

Situations where it can be raised include not being able to find the starting or terminating boundary in a multipart/* message.

See About this document... for information on suggesting changes.