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

7 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-07-04 11:22 +0000

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

2# RELEASE_EXCEPTIONS - Release (TUF/tufup) operation exceptions 

3# Project: ezcompiler 

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

5 

6""" 

7Release exceptions - Specialized exceptions for secure-release operations. 

8 

9Canonical ``ReleaseError`` lives here (utils subtree), under ``EzCompilerError``. 

10The services subtree re-imports it instead of redefining one — a single 

11``ReleaseError`` shared by all code (mirrors the ``UploadError`` pattern). 

12""" 

13 

14from __future__ import annotations 

15 

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

17# IMPORTS 

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

19from ._base import EzCompilerError 

20 

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

22# EXCEPTIONS 

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

24 

25 

26class ReleaseError(EzCompilerError): 

27 """Base exception for secure-release operation errors (canonical).""" 

28 

29 

30class ReleaserTypeError(ReleaseError): 

31 """Raised when the requested releaser type is not supported.""" 

32 

33 

34class BundleBuildError(ReleaseError): 

35 """Raised when building the release bundle archive fails.""" 

36 

37 

38class SigningKeyError(ReleaseError): 

39 """Raised when signing keys are missing, invalid, or inaccessible.""" 

40 

41 

42class ReleaseConfigError(ReleaseError): 

43 """Raised when release configuration is invalid or incomplete."""