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

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

9 statements  

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 

14InterpretError = ValueError 

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

16 

17 

18class ByteAlignError(Error): 

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

20 

21 

22CreationError = ValueError 

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

24