# 6. `VirtualMailManager.errors` — Exception classes

Exceptions, used by VirtualMailManager’s classes.

## 6.1. Exceptions

exception VirtualMailManager.errors.VMMError(msg, code)

  Bases: `exceptions.Exception`

  Parameters:

    - msg (`basestring`) – the error message

    - code (`int`) – the error code (one of `VirtualMailManager.constants.ERROR`)

  Base class for all other Exceptions in the VirtualMailManager package.

  The msg and code are accessible via the both attributes:

  msg

    The error message of the exception.

  code

    The numerical error code of the exception.

exception VirtualMailManager.errors.ConfigError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for configuration (`VirtualMailManager.Config`) exceptions.

exception VirtualMailManager.errors.PermissionError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for file permission exceptions.

exception VirtualMailManager.errors.NotRootError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for non-root exceptions.

exception VirtualMailManager.errors.DomainError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for Domain (`VirtualMailManager.Domain`) exceptions.

exception VirtualMailManager.errors.AliasDomainError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for AliasDomain (`VirtualMailManager.AliasDomain`) exceptions.

exception VirtualMailManager.errors.AccountError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for Account (`VirtualMailManager.Account`) exceptions.

exception VirtualMailManager.errors.AliasError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for Alias (`VirtualMailManager.Alias`) exceptions.

exception VirtualMailManager.errors.EmailAddressError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for EmailAddress (`VirtualMailManager.EmailAddress`) exceptions.

exception VirtualMailManager.errors.MailLocationError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for MailLocation (`VirtualMailManager.MailLocation`) exceptions.

exception VirtualMailManager.errors.RelocatedError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for Relocated (`VirtualMailManager.Relocated`) exceptions.

exception VirtualMailManager.errors.TransportError(msg, code)

  Bases: `VirtualMailManager.errors.VMMError`

  Exception class for Transport (`VirtualMailManager.Transport`) exceptions.