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 for invalid storage container names.
62 """
63 pass
64
65
67 """
68 Raised for invalid storage object names.
69 """
70 pass
71
72
78
79
85
86
88 """
89 Not a valid url for use with this software.
90 """
91 pass
92
93
95 """
96 Not a valid storage_object size attribute.
97 """
98 pass
99
100
102 """
103 Raised when there is a insufficient amount of data to send.
104 """
105 pass
106
107
109 """
110 Raised when public features of a non-public container are accessed.
111 """
112 pass
113
114
116 """
117 CDN is not enabled for this account.
118 """
119 pass
120
121
123 """
124 Raised on a failure to authenticate.
125 """
126 pass
127
128
130 """
131 Raised when an unspecified authentication error has occurred.
132 """
133 pass
134