# Copyright (C) 2001,2002 Python Software Foundation
# Author: barry@zope.com (Barry Warsaw)

"""email package exception classes.
"""



class MessageError(Exception):
    """Base class for errors in the email package."""


class MessageParseError(MessageError):
    """Base class for message parsing errors."""


class HeaderParseError(MessageParseError):
    """Error while parsing headers."""


class BoundaryError(MessageParseError):
    """Couldn't find terminating boundary."""


class MultipartConversionError(MessageError, TypeError):
    """Conversion to a multipart is prohibited."""

@@ -17,13 +17,13 @@
 2001
-,2002
+-2004
  Pyt
@@ -66,16 +66,18 @@
 rry@
-zope.com
+python.org
  (Ba
@@ -124,17 +124,16 @@
 classes.
-%0A
 %22%22%22%0A%0A%0A%0C%0A
@@ -585,12 +585,793 @@
 hibited.%22%22%22%0A
+%0A%0A%0C%0A# These are parsing defects which the parser was able to work around.%0Aclass MessageDefect:%0A    %22%22%22Base class for a message defect.%22%22%22%0A%0A    def __init__(self, line=None):%0A        self.line = line%0A%0Aclass NoBoundaryInMultipart(MessageDefect):%0A    %22%22%22A message claimed to be a multipart but had no boundary parameter.%22%22%22%0A%0Aclass StartBoundaryNotFound(MessageDefect):%0A    %22%22%22The claimed start boundary was never found.%22%22%22%0A%0Aclass FirstHeaderLineIsContinuation(MessageDefect):%0A    %22%22%22A message had a continuation line as its first header line.%22%22%22%0A%0Aclass MisplacedEnvelopeHeader(MessageDefect):%0A    %22%22%22A 'Unix-from' header was found in the middle of a header block.%22%22%22%0A%0Aclass MalformedHeader(MessageDefect):%0A    %22%22%22Found a header that was missing a colon, or was otherwise malformed%22%22%22%0A

Add MessageDefect and subclasses.