build.exceptions   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Test Coverage

Coverage 92.86%

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 47
ccs 13
cts 14
cp 0.9286
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 ActivationError(EVCException):
37
    """Exception when an EVC couldn't get activated."""
38
39
40 1
class DuplicatedNoTagUNI(MEFELineException):
41
    """Exception for duplicated no TAG UNI"""
42 1
    def __init__(self, msg: str) -> None:
43 1
        self.msg = msg
44
45 1
    def __repr__(self) -> str:
46
        return f"DuplicatedNoTagUNI, {self.msg}"
47