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

10 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-27 06:49 +0000

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

2# SERVICE_EXCEPTIONS - Service layer exceptions 

3# Project: ezcompiler 

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

5 

6""" 

7Service exceptions - Specialized exceptions for service layer operations. 

8 

9This module defines exceptions for the business logic layer (services). 

10Each service has a base exception with specific error scenarios. 

11Granularity is limited to essential error categories to avoid exception overload. 

12""" 

13 

14from __future__ import annotations 

15 

16# /////////////////////////////////////////////////////////////// 

17# IMPORTS 

18# /////////////////////////////////////////////////////////////// 

19from .base import EzCompilerServiceError 

20 

21# /////////////////////////////////////////////////////////////// 

22# EXCEPTIONS - COMPILER SERVICE 

23# /////////////////////////////////////////////////////////////// 

24 

25 

26class CompilerServiceError(EzCompilerServiceError): 

27 """Base exception for compiler service operations.""" 

28 

29 

30class CompilationError(CompilerServiceError): 

31 """Raised when project compilation fails.""" 

32 

33 

34class ConfigurationError(CompilerServiceError): 

35 """Raised when configuration is invalid or missing.""" 

36 

37 

38# /////////////////////////////////////////////////////////////// 

39# EXCEPTIONS - TEMPLATE SERVICE 

40# /////////////////////////////////////////////////////////////// 

41 

42 

43class TemplateServiceError(EzCompilerServiceError): 

44 """Base exception for template service operations.""" 

45 

46 

47class TemplateError(TemplateServiceError): 

48 """Raised when template processing or file generation fails.""" 

49 

50 

51class VersionError(TemplateServiceError): 

52 """Raised when version file generation fails.""" 

53 

54 

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

56# EXCEPTIONS - UPLOADER SERVICE 

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

58 

59 

60class UploaderServiceError(EzCompilerServiceError): 

61 """Base exception for uploader service operations.""" 

62 

63 

64class UploadError(UploaderServiceError): 

65 """Raised when upload operation fails."""