Coverage for object_streams/exceptions.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.16.0, created at 2026-09-02 17:07 +0000

1"""Domain exceptions for object stream registration and evaluation.""" 

2 

3 

4class ObjectStreamsError(Exception): 

5 """Base exception for package-specific errors.""" 

6 

7 

8class RegistrationError(ObjectStreamsError): 

9 """Base exception for registry errors.""" 

10 

11 

12class AlreadyRegistered(RegistrationError): 

13 """Raised when a model is registered more than once.""" 

14 

15 

16class NotRegistered(RegistrationError): 

17 """Raised when a requested model has no object stream registration.""" 

18 

19 

20class FilterValidationError(ObjectStreamsError): 

21 """Raised when subscription filter parameters fail FilterSet validation.""" 

22 

23 def __init__(self, errors): 

24 self.errors = errors 

25 super().__init__(str(errors))