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

6 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-27 06:49 +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 

59 

60# /////////////////////////////////////////////////////////////// 

61# PUBLIC API - Exception modules 

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

63 

64__all__ = [ 

65 # Exception modules 

66 "services", 

67 "base", 

68 "compiler_exceptions", 

69 "config_exceptions", 

70 "file_exceptions", 

71 "uploader_exceptions", 

72 "template_exceptions", 

73 "validation_exceptions", 

74 "zip_exceptions", 

75 # Base exception (re-exported for convenience) 

76 "EzCompilerError", 

77 # Service exceptions (re-exported for convenience) 

78 "CompilerServiceError", 

79 "CompilationError", 

80 "ConfigurationError", 

81 "TemplateServiceError", 

82 "TemplateError", 

83 "VersionError", 

84 "UploaderServiceError", 

85 "UploadError", 

86]