Coverage for faststream / kafka / exceptions.py: 80%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-05-08 01:48 +0000

1from faststream.exceptions import FastStreamException 

2 

3 

4class BatchBufferOverflowException(FastStreamException): 

5 """Exception raised when a buffer overflow occurs when adding a new message to the batches.""" 

6 

7 def __init__(self, message_position: int) -> None: 

8 self.message_position = message_position 

9 

10 def __str__(self) -> str: 

11 return ( 

12 "The batch buffer is full. The position of the message" 

13 f" in the transferred collection at which the overflow occurred: {self.message_position}" 

14 )