Coverage for src/ezcompiler/shared/exceptions/services/_service_exceptions.py: 100.00%
13 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-04 11:22 +0000
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-04 11:22 +0000
1# ///////////////////////////////////////////////////////////////
2# SERVICE_EXCEPTIONS - Service layer exceptions
3# Project: ezcompiler
4# ///////////////////////////////////////////////////////////////
6"""
7Service exceptions - Specialized exceptions for service layer operations.
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"""
14from __future__ import annotations
16# ///////////////////////////////////////////////////////////////
17# IMPORTS
18# ///////////////////////////////////////////////////////////////
19from ..utils._release_exceptions import ReleaseError
20from ..utils._updater_exceptions import UpdaterError
21from ..utils._uploader_exceptions import UploadError
22from ._base import EzCompilerServiceError
24# ///////////////////////////////////////////////////////////////
25# EXCEPTIONS - COMPILER SERVICE
26# ///////////////////////////////////////////////////////////////
29class CompilerServiceError(EzCompilerServiceError):
30 """Base exception for compiler service operations."""
33class CompilationError(CompilerServiceError):
34 """Raised when project compilation fails."""
37class ConfigurationError(CompilerServiceError):
38 """Raised when configuration is invalid or missing."""
41# ///////////////////////////////////////////////////////////////
42# EXCEPTIONS - TEMPLATE SERVICE
43# ///////////////////////////////////////////////////////////////
46class TemplateServiceError(EzCompilerServiceError):
47 """Base exception for template service operations."""
50class TemplateError(TemplateServiceError):
51 """Raised when template processing or file generation fails."""
54class VersionError(TemplateServiceError):
55 """Raised when version file generation fails."""
58# ///////////////////////////////////////////////////////////////
59# EXCEPTIONS - UPLOADER SERVICE
60# ///////////////////////////////////////////////////////////////
63class UploaderServiceError(EzCompilerServiceError):
64 """Base exception for uploader service operations.
66 Conservé pour compatibilité ; `UploadError` est désormais l'unique classe
67 canonique importée depuis utils/_uploader_exceptions.py (sous EzCompilerError).
68 """
71# UploadError est ré-exporté ici (importé ci-dessus) pour préserver l'API publique
72# `from ..shared.exceptions import UploadError` sans dupliquer la classe.
73__all__ = [
74 "CompilerServiceError",
75 "CompilationError",
76 "ConfigurationError",
77 "TemplateServiceError",
78 "TemplateError",
79 "VersionError",
80 "UploaderServiceError",
81 "UploadError",
82 "ReleaseError",
83 "UpdaterError",
84]