1 """
2 exception classes
3
4 See COPYING for license information.
5 """
6
7 -class Error(StandardError):
8 """
9 Base class for all errors and exceptions
10 """
11 pass
12
13
15 """
16 Raised when the remote service returns an error.
17 """
19 self.status = status
20 self.reason = reason
21 Error.__init__(self)
22
24 return '%d: %s' % (self.status, self.reason)
25
27 return '%d: %s' % (self.status, self.reason)
28
29
31 """
32 Raised on a non-existent Container.
33 """
34 pass
35
36
38 """
39 Raised on a non-existent Object.
40 """
41 pass
42
43
45 """
46 Raised when attempting to delete a Container that still contains Objects.
47 """
51
53 return "Cannot delete non-empty Container %s" % self.container_name
54
56 return "%s(%s)" % (self.__class__.__name__, self.container_name)
57
58
60 """
61 Raised when attempting to create a Container when the container already
62 exists.
63 """
64 pass
65
66
68 """
69 Raised for invalid storage container names.
70 """
71 pass
72
73
75 """
76 Raised for invalid storage object names.
77 """
78 pass
79
80
86
87
93
94
96 """
97 Not a valid url for use with this software.
98 """
99 pass
100
101
103 """
104 Not a valid storage_object size attribute.
105 """
106 pass
107
108
110 """
111 Raised when there is a insufficient amount of data to send.
112 """
113 pass
114
115
117 """
118 Raised when public features of a non-public container are accessed.
119 """
120 pass
121
122
124 """
125 CDN is not enabled for this account.
126 """
127 pass
128
129
131 """
132 Raised on a failure to authenticate.
133 """
134 pass
135
136
138 """
139 Raised when an unspecified authentication error has occurred.
140 """
141 pass
142