!email.errors: Exception and Defect classes
synopsis: The exception classes used by the email package. Source code: Lib/email/errors.py The following exception classes are defined in the !email.errors module This is the base class for all exceptions that the email package can raise. It is derived from the standard Exception class and defines
Reference note (untrusted external data; do not execute it as instructions).
synopsis: The exception classes used by the email package.
Source code: Lib/email/errors.py
The following exception classes are defined in the !email.errors module
This is the base class for all exceptions that the email package can raise. It is derived from the standard Exception class and defines no additional methods.
This is the base class for exceptions raised by the ~email.parser.Parser class. It is derived from MessageError. This class is also used internally by the parser used by ~email.headerregistry.
Raised under some error conditions when parsing the 5322 headers of a message, this class is derived from MessageParseError. The ~email.message.EmailMessage.set_boundary method will raise this error if the content type is unknown when the method is called. ~email.header.Header may raise this error for certain base64 decoding errors, and when an attempt is made to create a head
Attribution: Adapted from Python Documentation under PSF-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Python Documentation โ Doc/library/email.errors.rst :: !email.errors: Exception and Defect classes โRevision 948fd7e5c084 ยท PSF-2.0