Passed
Push — master ( c72751...2e9109 )
by Aldo
05:05 queued 02:27
created

build.exceptions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 92.31%

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 43
ccs 12
cts 13
cp 0.9231
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A DuplicatedNoTagUNI.__repr__() 0 2 1
A DuplicatedNoTagUNI.__init__() 0 2 1
1
"""MEF Eline Exceptions."""
2
3
4 1
class MEFELineException(Exception):
5
    """MEF Eline Base Exception."""
6
7
8 1
class EVCException(MEFELineException):
9
    """EVC Exception."""
10
11
12 1
class ValidationException(EVCException):
13
    """Exception for validation errors."""
14
15
16 1
class FlowModException(MEFELineException):
17
    """Exception for FlowMod errors."""
18
19
20 1
class PathFinderException(MEFELineException):
21
    """Exception related to pathfinder request."""
22
23
24 1
class InvalidPath(MEFELineException):
25
    """Exception for invalid path."""
26
27
28 1
class DisabledSwitch(MEFELineException):
29
    """Exception for disabled switch in path"""
30
31
32 1
class EVCPathNotInstalled(MEFELineException):
33
    """Exception raised when a path was not installed properly."""
34
35
36 1
class DuplicatedNoTagUNI(MEFELineException):
37
    """Exception for duplicated no TAG UNI"""
38 1
    def __init__(self, msg: str) -> None:
39 1
        self.msg = msg
40
41 1
    def __repr__(self) -> str:
42
        return f"DuplicatedNoTagUNI, {self.msg}"
43