Exceptions¶
- exception tortoise.exceptions.ConfigurationError[source]¶
Bases:
BaseORMExceptionThe ConfigurationError exception is raised when the configuration of the ORM is invalid.
- exception tortoise.exceptions.DBConnectionError[source]¶
Bases:
BaseORMException,ConnectionErrorThe DBConnectionError is raised when problems with connecting to db occurs
- exception tortoise.exceptions.DoesNotExist(model, *args)[source]¶
Bases:
NotExistOrMultipleThe DoesNotExist exception is raised when expecting data, such as a
.get()operation.-
TEMPLATE =
'Object "{}" does not exist'¶
-
TEMPLATE =
- exception tortoise.exceptions.FieldError[source]¶
Bases:
BaseORMExceptionThe FieldError exception is raised when there is a problem with a model field.
- exception tortoise.exceptions.IncompleteInstanceError[source]¶
Bases:
OperationalErrorThe IncompleteInstanceError exception is raised when a partial model is attempted to be persisted.
- exception tortoise.exceptions.IntegrityError[source]¶
Bases:
OperationalErrorThe IntegrityError exception is raised when there is an integrity error.
- exception tortoise.exceptions.MultipleObjectsReturned(model, *args)[source]¶
Bases:
NotExistOrMultipleThe MultipleObjectsReturned exception is raised when doing a
.get()operation, and more than one object is returned.-
TEMPLATE =
'Multiple objects returned for "{}", expected exactly one'¶
-
TEMPLATE =
- exception tortoise.exceptions.NoValuesFetched[source]¶
Bases:
OperationalErrorThe NoValuesFetched exception is raised when the related model was never fetched.
- exception tortoise.exceptions.NotExistOrMultiple(model, *args)[source]¶
Bases:
OperationalError-
TEMPLATE =
''¶
-
TEMPLATE =
- exception tortoise.exceptions.ObjectDoesNotExistError(model, pk_name, pk_val)[source]¶
Bases:
OperationalError,KeyErrorThe DoesNotExist exception is raised when an item with the passed primary key does not exist
- exception tortoise.exceptions.OperationalError[source]¶
Bases:
BaseORMExceptionThe OperationalError exception is raised when an operational error occurs.
- exception tortoise.exceptions.ParamsError[source]¶
Bases:
BaseORMExceptionThe ParamsError is raised when function can not be run with given parameters
- exception tortoise.exceptions.TransactionManagementError[source]¶
Bases:
BaseORMExceptionThe TransactionManagementError is raised when any transaction error occurs.
- exception tortoise.exceptions.UnSupportedError[source]¶
Bases:
BaseORMExceptionThe UnSupportedError is raised when operation is not supported.
- exception tortoise.exceptions.ValidationError[source]¶
Bases:
BaseORMExceptionThe ValidationError is raised when validators of field validate failed.