Advertisement
Advertisement
Django Core Exception Classes | Description |
---|---|
AppRegistryNotReady | This exception is raised when attempting to use models before the app loading process. |
ObjectDoesNotExist | The base class for DoesNotExist exceptions and it will catch all kinds of DoesNotExist exceptions. |
EmptyResultSet | This exception may be raised during the query generation i.e.when a query doesn't result any result. |
FieldDoesNotExist | This exception is raised by the model when the requested field does not exist on the model or on the model's parents. |
MultipleObjectsReturned | This exception is raised by a query, when one object was expected but multiple objects were returned. |
Suspicious Operation | This exception is raised when a user has performed an suspicious operation from a security point of view, such as tampering with a session cookie. |
PermissionDenied | This exception is raised when a user doesn not have a permission to perform a certain action. |
ViewDoesNotExist | This type of exception is raised by django.urls when a requested view does not exist. |
MiddlewareNotUsed | This type of exception is raised when a middleware is not used in a server configuration. |
ImproperlyConfigured | This type of exception is raised when Django is improperly configured, for example - when a value in settings.py is incorrect. |
FieldError | This type of exception is raised when there is a problem with a model's field, which could happen due to one of the following reasons:
|
ValidationError | This type of exception is when data fails form or model field validation. |
Django URL Resolver Exception Classes | Description |
---|---|
Resolver404 | This exception is raised if the path passed to resolve() doesn’t map to a view. |
NoReverseMatch | This exception is raised by django.urls when a matching URL defined in URLconf cannot be identified based on the supplied parameters. |
Django Database Classes | Description |
---|---|
Error | This is the base class of all other error exceptions. You can use this to catch all errors with one single except statement. |
Error | This is the base class of all other error exceptions. You can use this to catch all errors with one single except statement. |
InterfaceError | This exception is raised for the errors that are related to the database interface rather than the database itself. |
DatabaseError | This exception is raised for the errors that are related to the database. |
DataError | This exception is raised for the errors which are raised while processing data like, division by zero, numeric value out of range. |
OperationalError | This exception is raised for the errors that are related to the database's operation and not necessarily under the control of the programmer, for example - an unexpected disconnect occurs, a transaction could not be processed, a memory allocation error occurred during processing, etc |
IntegrityError | This exception is raised when the relational integrity of the database is affected, for example - when a foreign key check has failed. |
InternalError | This exception raised when the database encounters an internal error, for example - the cursor is not valid anymore. |
ProgrammingError | This exception is raised for the programming errors, for example - table not found or already exists, syntax error in the SQL statements . |
NotSupportedError | This exception is raised in a situation when a method or database API used, is not supported by the database.. |
Django Http Exception Class | Description |
---|---|
UnreadablePostError | This type of exception is raised when a user cancels an upload. |
Django Transaction Exception Class | Description |
---|---|
TransactionManagementError | This type of exception is raisedfor all problems related to database transactions. |
Django Testing Exception Class | Description |
---|---|
RedirectCycleError | This type of exception is raised when the test client detects a loop or an overly long chain of redirects. |
Advertisement
Advertisement
Please check our latest addition
C#, PYTHON and DJANGO
Advertisement