|
6 | 6 | Licensed under CDDL 1.0 |
7 | 7 | ''' |
8 | 8 |
|
9 | | -class ConnectionError(Exception): |
10 | | - def __init__(self, msg, response): |
11 | | - super(ConnectionError, self).__init__(u'%s' % msg) |
| 9 | +class EbaySDKError(StandardError): |
| 10 | + def __init__(self, msg, response=None): |
| 11 | + super(EbaySDKError, self).__init__(u'%s' % msg) |
12 | 12 | self.message = u'%s' % msg |
13 | 13 | self.response = response |
14 | 14 |
|
15 | 15 | def __str__(self): |
16 | 16 | return repr(self.message) |
17 | 17 |
|
18 | | -class ConnectionConfigError(Exception): |
19 | | - def __init__(self, msg): |
20 | | - super(ConnectionConfigError, self).__init__(u'%s' % msg) |
21 | | - self.message = u'%s' % msg |
22 | | - |
23 | | - def __str__(self): |
24 | | - return repr(self.message) |
25 | | - |
26 | | -class ConnectionResponseError(Exception): |
27 | | - def __init__(self, msg, response): |
28 | | - super(ConnectionResponseError, self).__init__(u'%s' % msg) |
29 | | - self.message = u'%s' % msg |
30 | | - self.response = response |
31 | | - |
32 | | - def __str__(self): |
33 | | - return repr(self.message) |
| 18 | +class ConnectionError(EbaySDKError): |
| 19 | + pass |
34 | 20 |
|
35 | | -class RequestPaginationError(Exception): |
36 | | - def __init__(self, msg, response): |
37 | | - super(RequestPaginationError, self).__init__(u'%s' % msg) |
38 | | - self.message = u'%s' % msg |
39 | | - self.response = response |
| 21 | +class ConnectionConfigError(EbaySDKError): |
| 22 | + pass |
40 | 23 |
|
41 | | - def __str__(self): |
42 | | - return repr(self.message) |
| 24 | +class ConnectionResponseError(EbaySDKError): |
| 25 | + pass |
43 | 26 |
|
44 | | -class PaginationLimit(Exception): |
45 | | - def __init__(self, msg, response): |
46 | | - super(PaginationLimit, self).__init__(u'%s' % msg) |
47 | | - self.message = u'%s' % msg |
48 | | - self.response = response |
| 27 | +class RequestPaginationError(EbaySDKError): |
| 28 | + pass |
49 | 29 |
|
50 | | - def __str__(self): |
51 | | - return repr(self.message) |
| 30 | +class PaginationLimit(EbaySDKError): |
| 31 | + pass |
0 commit comments