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:05:50 -0400 |
| commit | 1a62f197078eae72eba85f23aabacc06ad4c7d79 (patch) | |
| tree | 9669173b0e15fcc555ffdc951357bc804bc44f73 /docs/ref/exceptions.txt | |
| parent | 681df1aeafb30092430157f7977f713e1ce234ca (diff) | |
Fixed #24763 -- Moved DoesNotExist exception to model docs.
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`` --------------------- |
