Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / lib / python2.4 / email / Errors.py
CommitLineData
920dae64
AT
1# Copyright (C) 2001-2004 Python Software Foundation
2# Author: Barry Warsaw
3# Contact: email-sig@python.org
4
5"""email package exception classes."""
6
7
8\f
9class MessageError(Exception):
10 """Base class for errors in the email package."""
11
12
13class MessageParseError(MessageError):
14 """Base class for message parsing errors."""
15
16
17class HeaderParseError(MessageParseError):
18 """Error while parsing headers."""
19
20
21class BoundaryError(MessageParseError):
22 """Couldn't find terminating boundary."""
23
24
25class MultipartConversionError(MessageError, TypeError):
26 """Conversion to a multipart is prohibited."""
27
28
29\f
30# These are parsing defects which the parser was able to work around.
31class MessageDefect:
32 """Base class for a message defect."""
33
34 def __init__(self, line=None):
35 self.line = line
36
37class NoBoundaryInMultipartDefect(MessageDefect):
38 """A message claimed to be a multipart but had no boundary parameter."""
39
40class StartBoundaryNotFoundDefect(MessageDefect):
41 """The claimed start boundary was never found."""
42
43class FirstHeaderLineIsContinuationDefect(MessageDefect):
44 """A message had a continuation line as its first header line."""
45
46class MisplacedEnvelopeHeaderDefect(MessageDefect):
47 """A 'Unix-from' header was found in the middle of a header block."""
48
49class MalformedHeaderDefect(MessageDefect):
50 """Found a header that was missing a colon, or was otherwise malformed."""
51
52class MultipartInvariantViolationDefect(MessageDefect):
53 """A message claimed to be a multipart but no subparts were found."""