diff options
| author | David Krisch <david@hq.realgeeks.com> | 2015-05-07 15:30:04 -1000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-05-08 13:13:45 -0400 |
| commit | 51ebc8805e1a0bd5d347587f483fc07fc206df9f (patch) | |
| tree | 895b2a2445fd3b595ea0c9d4f96d1cc43c3f5807 /docs/ref/exceptions.txt | |
| parent | eb534f64121a38ba0951a6fa3d9ee85aac33213c (diff) | |
[1.8.x] Fixed #24763 -- Moved DoesNotExist exception to model docs.
Backport of 1a62f197078eae72eba85f23aabacc06ad4c7d79 from master
Diffstat (limited to 'docs/ref/exceptions.txt')
| -rw-r--r-- | docs/ref/exceptions.txt | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt index 61f5e7fb7a..46a0c81c22 100644 --- a/docs/ref/exceptions.txt +++ b/docs/ref/exceptions.txt @@ -12,25 +12,17 @@ Django Core Exceptions Django core exception classes are defined in ``django.core.exceptions``. -``ObjectDoesNotExist`` and ``DoesNotExist`` -------------------------------------------- - -.. exception:: DoesNotExist - - The ``DoesNotExist`` exception is raised when an object is not found for - the given parameters of a query. Django provides a ``DoesNotExist`` - exception as an attribute of each model class to identify the class of - object that could not be found and to allow you to catch a particular model - class with ``try/except``. +``ObjectDoesNotExist`` +---------------------- .. exception:: ObjectDoesNotExist - The base class for ``DoesNotExist`` exceptions; a ``try/except`` for - ``ObjectDoesNotExist`` will catch ``DoesNotExist`` exceptions for all - models. + The base class for :exc:`~django.db.models.Model.DoesNotExist` exceptions; + a ``try/except`` for ``ObjectDoesNotExist`` will catch + :exc:`~django.db.models.Model.DoesNotExist` exceptions for all models. See :meth:`~django.db.models.query.QuerySet.get()` for further information - on :exc:`ObjectDoesNotExist` and :exc:`DoesNotExist`. + on :exc:`ObjectDoesNotExist` and :exc:`~django.db.models.Model.DoesNotExist`. ``FieldDoesNotExist`` --------------------- |
