Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/bitstring/exceptions.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.3.1, created at 2023-09-25 06:15 +0000

1 

2class Error(Exception): 

3 """Base class for errors in the bitstring module.""" 

4 

5 def __init__(self, *params: object) -> None: 

6 self.msg = params[0] if params else '' 

7 self.params = params[1:] 

8 

9 

10class ReadError(Error, IndexError): 

11 """Reading or peeking past the end of a bitstring.""" 

12 

13 

14class InterpretError(Error, ValueError): 

15 """Inappropriate interpretation of binary data.""" 

16 

17 

18class ByteAlignError(Error): 

19 """Whole-byte position or length needed.""" 

20 

21 

22class CreationError(Error, ValueError): 

23 """Inappropriate argument during bitstring creation."""