Raised when attempting to reassign a service in service container that is already in use.
| 43 | |
| 44 | @docs_group('Errors') |
| 45 | class ServiceConflictError(Exception): |
| 46 | """Raised when attempting to reassign a service in service container that is already in use.""" |
| 47 | |
| 48 | def __init__(self, service: type, new_value: object, existing_value: object) -> None: |
| 49 | super().__init__( |
| 50 | f'Service {service.__name__} is already in use. Existing value: {existing_value}, ' |
| 51 | f'attempted new value: {new_value}.' |
| 52 | ) |
| 53 | |
| 54 | |
| 55 | @docs_group('Errors') |
no outgoing calls
no test coverage detected