
"""Common DNS Exceptions."""

class DNSException(Exception):
    """Abstract base class shared by all dnspython exceptions."""
    pass

class FormError(DNSException):
    """DNS message is malformed."""
    pass

class SyntaxError(DNSException):
    """Text input is malformed."""
    pass

class UnexpectedEnd(SyntaxError):
    """Raised if text input ends unexpectedly."""
    pass

class TooBig(DNSException):
    """The message is too big."""
    pass

class Timeout(DNSException):
    """The operation timed out."""
    pass


"""Common DNS Exceptions."""

class DNSException(Exception):
    """Abstract base class shared by all dnspython exceptions."""
    def __init__(self, *args):
        if args:
            super(DNSException, self).__init__(*args)
        else:
            # doc string is better implicit message than empty string
            super(DNSException, self).__init__(self.__doc__)

class FormError(DNSException):
    """DNS message is malformed."""
    pass

class SyntaxError(DNSException):
    """Text input is malformed."""
    pass

class UnexpectedEnd(SyntaxError):
    """Raised if text input ends unexpectedly."""
    pass

class TooBig(DNSException):
    """The message is too big."""
    pass

class Timeout(DNSException):
    """The operation timed out."""
    pass

Support string representation for all DNSExceptions.
Support string representation for all DNSExceptions.

Doc string is used in cases where more specific message was not provided
during instantiation/raise.

  
  """Common DNS Exceptions."""
  
  class DNSException(Exception):
      """Abstract base class shared by all dnspython exceptions."""
-     pass
+     def __init__(self, *args):
+         if args:
+             super(DNSException, self).__init__(*args)
+         else:
+             # doc string is better implicit message than empty string
+             super(DNSException, self).__init__(self.__doc__)
  
  class FormError(DNSException):
      """DNS message is malformed."""
      pass
  
  class SyntaxError(DNSException):
      """Text input is malformed."""
      pass
  
  class UnexpectedEnd(SyntaxError):
      """Raised if text input ends unexpectedly."""
      pass
  
  class TooBig(DNSException):
      """The message is too big."""
      pass
  
  class Timeout(DNSException):
      """The operation timed out."""
      pass
  
Support string representation for all DNSExceptions.
## Code Before:

"""Common DNS Exceptions."""

class DNSException(Exception):
    """Abstract base class shared by all dnspython exceptions."""
    pass

class FormError(DNSException):
    """DNS message is malformed."""
    pass

class SyntaxError(DNSException):
    """Text input is malformed."""
    pass

class UnexpectedEnd(SyntaxError):
    """Raised if text input ends unexpectedly."""
    pass

class TooBig(DNSException):
    """The message is too big."""
    pass

class Timeout(DNSException):
    """The operation timed out."""
    pass

## Instruction:
Support string representation for all DNSExceptions.
## Code After:

"""Common DNS Exceptions."""

class DNSException(Exception):
    """Abstract base class shared by all dnspython exceptions."""
    def __init__(self, *args):
        if args:
            super(DNSException, self).__init__(*args)
        else:
            # doc string is better implicit message than empty string
            super(DNSException, self).__init__(self.__doc__)

class FormError(DNSException):
    """DNS message is malformed."""
    pass

class SyntaxError(DNSException):
    """Text input is malformed."""
    pass

class UnexpectedEnd(SyntaxError):
    """Raised if text input ends unexpectedly."""
    pass

class TooBig(DNSException):
    """The message is too big."""
    pass

class Timeout(DNSException):
    """The operation timed out."""
    pass
