forked from ej2/python-quickbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
44 lines (31 loc) · 846 Bytes
/
exceptions.py
File metadata and controls
44 lines (31 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class QuickbooksException(Exception):
def __init__(self, message, error_code=0, detail=""):
super(QuickbooksException, self).__init__(message)
self.error_code = error_code
self.detail = detail
self.message = message
class AuthorizationException(QuickbooksException):
"""
Quickbooks Error Codes from 1 to 499
"""
pass
class UnsupportedException(QuickbooksException):
"""
Quickbooks Error Codes from 500 to 599
"""
pass
class GeneralException(QuickbooksException):
"""
Quickbooks Error Codes from 600 to 1999
"""
pass
class ValidationException(QuickbooksException):
"""
Quickbooks Error Codes from 2000 to 4999
"""
pass
class SevereException(QuickbooksException):
"""
Quickbooks Error Codes greater than 10000
"""
pass