Source code for tortoise.exceptions

[docs]class BaseORMException(Exception): """ Base ORM Exception. """
[docs]class FieldError(BaseORMException): """ The FieldError exception is raised when there is a problem with a model field. """
[docs]class ParamsError(BaseORMException): """ The ParamsError is raised when function can not be run with given parameters """
[docs]class ConfigurationError(BaseORMException): """ The ConfigurationError exception is raised when the configuration of the ORM is invalid. """
[docs]class TransactionManagementError(BaseORMException): """ The TransactionManagementError is raised when any transaction error occurs. """
[docs]class OperationalError(BaseORMException): """ The OperationalError exception is raised when an operational error occurs. """
[docs]class IntegrityError(OperationalError): """ The IntegrityError exception is raised when there is an integrity error. """
[docs]class NoValuesFetched(OperationalError): """ The NoValuesFetched exception is raised when the related model was never fetched. """
[docs]class MultipleObjectsReturned(OperationalError): """ The MultipleObjectsReturned exception is raised when doing a ``.get()`` operation, and more than one object is returned. """
[docs]class DoesNotExist(OperationalError): """ The DoesNotExist exception is raised when expecting data, such as a ``.get()`` operation. """
[docs]class IncompleteInstanceError(OperationalError): """ The IncompleteInstanceError exception is raised when a partial model is attempted to be persisted. """
[docs]class DBConnectionError(BaseORMException, ConnectionError): """ The DBConnectionError is raised when problems with connecting to db occurs """
[docs]class ValidationError(BaseORMException): """ The ValidationError is raised when validators of field validate failed. """
[docs]class UnSupportedError(BaseORMException): """ The UnSupportedError is raised when operation is not supported. """