Coverage for src / ezcompiler / shared / exceptions / __init__.py: 100.00%

8 statements  

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

1# /////////////////////////////////////////////////////////////// 

2# EXCEPTIONS PACKAGE - Specialized exception hierarchy 

3# Project: ezcompiler 

4# /////////////////////////////////////////////////////////////// 

5 

6""" 

7Exceptions package - Specialized exceptions organized by module functionality. 

8 

9This package provides fine-grained exceptions for different layers and utilities 

10of the EzCompiler project, enabling precise error handling. 

11 

12Structure: 

13- services: Service layer exceptions (compiler, template, uploader services) 

14- utils: Utility layer exceptions 

15 - file_exceptions: File and directory operation errors 

16 - compiler_exceptions: Compiler operation errors 

17 - uploader_exceptions: Upload operation errors 

18 - validation_exceptions: Validation errors 

19 - zip_exceptions: ZIP archive errors 

20 - config_exceptions: Configuration errors 

21 - template_exceptions: Template processing errors 

22""" 

23 

24from __future__ import annotations 

25 

26# /////////////////////////////////////////////////////////////// 

27# IMPORTS - Exception modules from services 

28# /////////////////////////////////////////////////////////////// 

29from . import services 

30from .services import ( 

31 CompilationError, 

32 CompilerServiceError, 

33 ConfigurationError, 

34 TemplateError, 

35 TemplateServiceError, 

36 UploadError, 

37 UploaderServiceError, 

38 VersionError, 

39) 

40 

41# /////////////////////////////////////////////////////////////// 

42# IMPORTS - Exception modules from utils 

43# /////////////////////////////////////////////////////////////// 

44from .utils import ( 

45 _base, 

46 _compiler_exceptions, 

47 _config_exceptions, 

48 _file_exceptions, 

49 _template_exceptions, 

50 _uploader_exceptions, 

51 _validation_exceptions, 

52 _zip_exceptions, 

53) 

54 

55# /////////////////////////////////////////////////////////////// 

56# RE-EXPORTS - Base exception for backward compatibility 

57# /////////////////////////////////////////////////////////////// 

58from .utils._base import EzCompilerError 

59from .utils._config_exceptions import ConfigError 

60from .utils._zip_exceptions import ZipError 

61 

62# /////////////////////////////////////////////////////////////// 

63# PUBLIC API - Exception modules 

64# /////////////////////////////////////////////////////////////// 

65 

66__all__ = [ 

67 # Exception modules 

68 "services", 

69 "_base", 

70 "_compiler_exceptions", 

71 "_config_exceptions", 

72 "_file_exceptions", 

73 "_uploader_exceptions", 

74 "_template_exceptions", 

75 "_validation_exceptions", 

76 "_zip_exceptions", 

77 # Base exception (re-exported for convenience) 

78 "EzCompilerError", 

79 # Service exceptions (re-exported for convenience) 

80 "CompilerServiceError", 

81 "CompilationError", 

82 "ConfigurationError", 

83 "TemplateServiceError", 

84 "TemplateError", 

85 "VersionError", 

86 "UploaderServiceError", 

87 "UploadError", 

88 # Util exceptions promoted for interface layer use 

89 "ConfigError", 

90 "ZipError", 

91]