Coverage for src / lexigram / contracts / data / vector / exceptions.py: 0%

11 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-08-15 18:57 +0800

1from __future__ import annotations 

2 

3from lexigram.contracts.exceptions.infra import InfrastructureError 

4 

5__all__ = [ 

6 "EmbeddingError", 

7 "VectorError", 

8 "VectorIndexError", 

9 "VectorStoreError", 

10] 

11 

12 

13class VectorError(InfrastructureError): 

14 """Base exception for vector store errors. 

15 

16 Extends InfrastructureError because vector operations involve 

17 external network I/O and database connections. 

18 """ 

19 

20 _code = "LEX_ERR_VEC_001" 

21 

22 

23class VectorStoreError(VectorError): 

24 """Exception raised during vector store operations (CRUD, search).""" 

25 

26 _code = "LEX_ERR_VEC_002" 

27 

28 

29class EmbeddingError(VectorError): 

30 """Exception raised during embedding generation or retrieval.""" 

31 

32 _code = "LEX_ERR_VEC_003" 

33 

34 

35class VectorIndexError(VectorError): 

36 """Exception raised during vector index creation or management.""" 

37 

38 _code = "LEX_ERR_VEC_004"