1 | 1 | class CFDIError(Exception): |
|
2 | """ |
||
3 | CFDI Error |
||
4 | """ |
||
5 | |||
6 | |||
7 | 1 | class SchemaValidationError(Exception): |
|
8 | """ |
||
9 | Schema Validation Error |
||
10 | """ |
||
11 | |||
12 | 1 | def __init__(self, error_log): |
|
13 | 1 | self.error_log = error_log |
|
14 | 1 | super().__init__(error_log) |
|
15 | |||
16 | |||
17 | 1 | class ResponseError(Exception): |
|
18 | """ |
||
19 | Request Response Error |
||
20 | """ |
||
21 | |||
22 | 1 | def __init__(self, response): |
|
23 | self.response = response |
||
24 | super().__init__(response) |
||
25 | |||
26 | |||
27 | 1 | class NamespaceMismatchError(Exception): |
|
28 | """ |
||
29 | Returned by objectify and xmlify |
||
30 | """ |
||
31 | |||
32 | 1 | def __init__(self, node): |
|
33 | self.node = node |
||
34 | super().__init__(node) |
||
35 | |||
36 | |||
37 | 1 | class DocumentNotFoundError(ResponseError): |
|
38 | 1 | pass |
|
39 | |||
40 | |||
41 | 1 | class CFDIInvalidError(ResponseError): |
|
42 | pass |
||
43 |