]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/email/errors.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / email / errors.py
CommitLineData
4710c53d 1# Copyright (C) 2001-2006 Python Software Foundation\r
2# Author: Barry Warsaw\r
3# Contact: email-sig@python.org\r
4\r
5"""email package exception classes."""\r
6\r
7\r
8\f\r
9class MessageError(Exception):\r
10 """Base class for errors in the email package."""\r
11\r
12\r
13class MessageParseError(MessageError):\r
14 """Base class for message parsing errors."""\r
15\r
16\r
17class HeaderParseError(MessageParseError):\r
18 """Error while parsing headers."""\r
19\r
20\r
21class BoundaryError(MessageParseError):\r
22 """Couldn't find terminating boundary."""\r
23\r
24\r
25class MultipartConversionError(MessageError, TypeError):\r
26 """Conversion to a multipart is prohibited."""\r
27\r
28\r
29class CharsetError(MessageError):\r
30 """An illegal charset was given."""\r
31\r
32\r
33\f\r
34# These are parsing defects which the parser was able to work around.\r
35class MessageDefect:\r
36 """Base class for a message defect."""\r
37\r
38 def __init__(self, line=None):\r
39 self.line = line\r
40\r
41class NoBoundaryInMultipartDefect(MessageDefect):\r
42 """A message claimed to be a multipart but had no boundary parameter."""\r
43\r
44class StartBoundaryNotFoundDefect(MessageDefect):\r
45 """The claimed start boundary was never found."""\r
46\r
47class FirstHeaderLineIsContinuationDefect(MessageDefect):\r
48 """A message had a continuation line as its first header line."""\r
49\r
50class MisplacedEnvelopeHeaderDefect(MessageDefect):\r
51 """A 'Unix-from' header was found in the middle of a header block."""\r
52\r
53class MalformedHeaderDefect(MessageDefect):\r
54 """Found a header that was missing a colon, or was otherwise malformed."""\r
55\r
56class MultipartInvariantViolationDefect(MessageDefect):\r
57 """A message claimed to be a multipart but no subparts were found."""\r