Passed
Push — master ( 2baa92...7a5266 )
by Vinicius
03:01 queued 27s
created

build.exceptions   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 90.91%

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 35
ccs 10
cts 11
cp 0.9091
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 InvalidPath(MEFELineException):
21
    """Exception for invalid path."""
22
23
24 1
class DisabledSwitch(MEFELineException):
25
    """Exception for disabled switch in path"""
26
27
28 1
class DuplicatedNoTagUNI(MEFELineException):
29
    """Exception for duplicated no TAG UNI"""
30 1
    def __init__(self, msg: str) -> None:
31 1
        self.msg = msg
32
33 1
    def __repr__(self) -> str:
34
        return f"DuplicatedNoTagUNI, {self.msg}"
35