Changeset 391 for python/trunk/Doc/library/email.errors.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/email.errors.rst
r2 r391 1 :mod:`email `: Exception and Defect classes2 ------------------------------------------ 1 :mod:`email.errors`: Exception and Defect classes 2 ------------------------------------------------- 3 3 4 4 .. module:: email.errors … … 18 18 .. exception:: MessageParseError() 19 19 20 This is the base class for exceptions thrownby the :class:`~email.parser.Parser`20 This is the base class for exceptions raised by the :class:`~email.parser.Parser` 21 21 class. It is derived from :exc:`MessageError`. 22 22 … … 26 26 Raised under some error conditions when parsing the :rfc:`2822` headers of a 27 27 message, this class is derived from :exc:`MessageParseError`. It can be raised 28 from the :meth:`Parser.parse` or :meth:`Parser.parsestr` methods. 28 from the :meth:`Parser.parse <email.parser.Parser.parse>` or 29 :meth:`Parser.parsestr <email.parser.Parser.parsestr>` methods. 29 30 30 31 Situations where it can be raised include finding an envelope header after the … … 38 39 Raised under some error conditions when parsing the :rfc:`2822` headers of a 39 40 message, this class is derived from :exc:`MessageParseError`. It can be raised 40 from the :meth:`Parser.parse` or :meth:`Parser.parsestr` methods. 41 from the :meth:`Parser.parse <email.parser.Parser.parse>` or 42 :meth:`Parser.parsestr <email.parser.Parser.parsestr>` methods. 41 43 42 44 Situations where it can be raised include not being able to find the starting or … … 47 49 .. exception:: MultipartConversionError() 48 50 49 Raised when a payload is added to a :class:` Message` object using50 :meth:`add_payload`, but the payload is already a scalar and the message's51 :mailheader:`Content-Type` main type is not either :mimetype:`multipart` or52 missing. :exc:`MultipartConversionError` multiply inherits from53 :exc:`MessageError` and the built-in :exc:`TypeError`.51 Raised when a payload is added to a :class:`~email.message.Message` object 52 using :meth:`add_payload`, but the payload is already a scalar and the 53 message's :mailheader:`Content-Type` main type is not either 54 :mimetype:`multipart` or missing. :exc:`MultipartConversionError` multiply 55 inherits from :exc:`MessageError` and the built-in :exc:`TypeError`. 54 56 55 Since :meth:`Message.add_payload` is deprecated, this exception is rarely raised 56 in practice. However the exception may also be raised if the :meth:`attach` 57 Since :meth:`Message.add_payload` is deprecated, this exception is rarely 58 raised in practice. However the exception may also be raised if the 59 :meth:`~email.message.Message.attach` 57 60 method is called on an instance of a class derived from 58 61 :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g. 59 62 :class:`~email.mime.image.MIMEImage`). 60 63 61 Here's the list of the defects that the :class:`~email. mime.parser.FeedParser`64 Here's the list of the defects that the :class:`~email.parser.FeedParser` 62 65 can find while parsing messages. Note that the defects are added to the message 63 66 where the problem was found, so for example, if a message nested inside a … … 87 90 88 91 * :class:`MultipartInvariantViolationDefect` -- A message claimed to be a 89 :mimetype:`multipart`, but no subparts were found. Note that when a message has90 this defect, its :meth:`is_multipart` method may return false even though its91 content type claims to be :mimetype:`multipart`.92 :mimetype:`multipart`, but no subparts were found. Note that when a message 93 has this defect, its :meth:`~email.message.Message.is_multipart` method may 94 return false even though its content type claims to be :mimetype:`multipart`. 92 95
Note:
See TracChangeset
for help on using the changeset viewer.