Coverage for openhcs/io/exceptions.py: 100.0%

14 statements  

« prev     ^ index     » next       coverage.py v7.10.3, created at 2025-08-14 05:57 +0000

1"""Doctrinal Exceptions for Structural Enforcement. 

2 

3This module defines exceptions that enforce structural integrity 

4and prevent runtime flexibility across the VFS boundary. 

5""" 

6 

7class StorageResolutionError(ValueError): 

8 """Raised when a storage key cannot be resolved to a valid VirtualPath.""" 

9 pass 

10 

11class ImageLoadError(RuntimeError): 

12 """Raised when image loading fails through the VFS boundary.""" 

13 pass 

14 

15class ImageSaveError(RuntimeError): 

16 """Raised when image saving fails through the VFS boundary.""" 

17 pass 

18 

19class StorageWriteError(RuntimeError): 

20 """Raised when writing to storage fails.""" 

21 pass 

22 

23class MetadataNotFoundError(ValueError): 

24 """Raised when required metadata files cannot be found.""" 

25 pass 

26 

27class PathMismatchError(ValueError): 

28 """Raised when a path scheme doesn't match the expected scheme for a backend.""" 

29 pass 

30 

31class VFSTypeError(TypeError): 

32 """Raised when a type error occurs in the VFS boundary.""" 

33 pass