source: titan/mediathek/localhoster/lib/python2.7/email/errors.py @ 40114

Last change on this file since 40114 was 40094, checked in by obi, 7 years ago

tithek add yoztube-dl support

File size: 1.6 KB
Line 
1# Copyright (C) 2001-2006 Python Software Foundation
2# Author: Barry Warsaw
3# Contact: email-sig@python.org
4
5"""email package exception classes."""
6
7
8
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
29class CharsetError(MessageError):
30    """An illegal charset was given."""
31
32
33
34# These are parsing defects which the parser was able to work around.
35class MessageDefect:
36    """Base class for a message defect."""
37
38    def __init__(self, line=None):
39        self.line = line
40
41class NoBoundaryInMultipartDefect(MessageDefect):
42    """A message claimed to be a multipart but had no boundary parameter."""
43
44class StartBoundaryNotFoundDefect(MessageDefect):
45    """The claimed start boundary was never found."""
46
47class FirstHeaderLineIsContinuationDefect(MessageDefect):
48    """A message had a continuation line as its first header line."""
49
50class MisplacedEnvelopeHeaderDefect(MessageDefect):
51    """A 'Unix-from' header was found in the middle of a header block."""
52
53class MalformedHeaderDefect(MessageDefect):
54    """Found a header that was missing a colon, or was otherwise malformed."""
55
56class MultipartInvariantViolationDefect(MessageDefect):
57    """A message claimed to be a multipart but no subparts were found."""
Note: See TracBrowser for help on using the repository browser.