view rhodecode/lib/dbmigrate/migrate/exceptions.py @ 1210:3bd2e94cbfc8 beta

pep8ify
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 05 Apr 2011 12:23:12 +0200
parents 9753e0907827
children 7f31de1584c6
line wrap: on
line source

"""
   Provide exception classes for :mod:`migrate`
"""


class Error(Exception):
    """Error base class."""


class ApiError(Error):
    """Base class for API errors."""


class KnownError(ApiError):
    """A known error condition."""


class UsageError(ApiError):
    """A known error condition where help should be displayed."""


class ControlledSchemaError(Error):
    """Base class for controlled schema errors."""


class InvalidVersionError(ControlledSchemaError):
    """Invalid version number."""


class DatabaseNotControlledError(ControlledSchemaError):
    """Database should be under version control, but it's not."""


class DatabaseAlreadyControlledError(ControlledSchemaError):
    """Database shouldn't be under version control, but it is"""


class WrongRepositoryError(ControlledSchemaError):
    """This database is under version control by another repository."""


class NoSuchTableError(ControlledSchemaError):
    """The table does not exist."""


class PathError(Error):
    """Base class for path errors."""


class PathNotFoundError(PathError):
    """A path with no file was required; found a file."""


class PathFoundError(PathError):
    """A path with a file was required; found no file."""


class RepositoryError(Error):
    """Base class for repository errors."""


class InvalidRepositoryError(RepositoryError):
    """Invalid repository error."""


class ScriptError(Error):
    """Base class for script errors."""


class InvalidScriptError(ScriptError):
    """Invalid script error."""


class NotSupportedError(Error):
    """Not supported error"""


class InvalidConstraintError(Error):
    """Invalid constraint error"""


class MigrateDeprecationWarning(DeprecationWarning):
    """Warning for deprecated features in Migrate"""