satcfdi.exceptions   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 76.47%

Importance

Changes 0
Metric Value
eloc 18
dl 0
loc 43
ccs 13
cts 17
cp 0.7647
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A NamespaceMismatchError.__init__() 0 3 1
A ResponseError.__init__() 0 3 1
A SchemaValidationError.__init__() 0 3 1
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