Django

Code

root/django/trunk/django/core/exceptions.py

Revision 7477, 0.8 kB (checked in by mtredinnick, 4 months ago)

Merged the queryset-refactor branch into trunk.

This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.

Fixed #245, #1050, #1656, #1801, #2076, #2091, #2150, #2253, #2306, #2400, #2430, #2482, #2496, #2676, #2737, #2874, #2902, #2939, #3037, #3141, #3288, #3440, #3592, #3739, #4088, #4260, #4289, #4306, #4358, #4464, #4510, #4858, #5012, #5020, #5261, #5295, #5321, #5324, #5325, #5555, #5707, #5796, #5817, #5987, #6018, #6074, #6088, #6154, #6177, #6180, #6203, #6658

  • Property svn:eol-style set to native
  • Property svn:keywords set to LastChangedRevision
Line 
1 "Global Django exceptions"
2
3 class ObjectDoesNotExist(Exception):
4     "The requested object does not exist"
5     silent_variable_failure = True
6
7 class MultipleObjectsReturned(Exception):
8     "The query returned multiple objects when only one was expected."
9     pass
10
11 class SuspiciousOperation(Exception):
12     "The user did something suspicious"
13     pass
14
15 class PermissionDenied(Exception):
16     "The user did not have permission to do that"
17     pass
18
19 class ViewDoesNotExist(Exception):
20     "The requested view does not exist"
21     pass
22
23 class MiddlewareNotUsed(Exception):
24     "This middleware is not used in this server configuration"
25     pass
26
27 class ImproperlyConfigured(Exception):
28     "Django is somehow improperly configured"
29     pass
30
31 class FieldError(Exception):
32     """Some kind of problem with a model field."""
33     pass
Note: See TracBrowser for help on using the browser.