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

10 statements  

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

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

2# ZIP_EXCEPTIONS - ZIP archive exceptions 

3# Project: ezcompiler 

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

5 

6""" 

7ZIP exceptions - Specialized exceptions for ZIP archive operations. 

8 

9This module defines exceptions for various ZIP-related failures 

10used by ZipUtils and archive operations. 

11""" 

12 

13from __future__ import annotations 

14 

15# /////////////////////////////////////////////////////////////// 

16# IMPORTS 

17# /////////////////////////////////////////////////////////////// 

18from .base import EzCompilerError 

19 

20# /////////////////////////////////////////////////////////////// 

21# EXCEPTIONS 

22# /////////////////////////////////////////////////////////////// 

23 

24 

25class ZipError(EzCompilerError): 

26 """Base exception for ZIP operation errors.""" 

27 

28 

29class ZipCreationError(ZipError): 

30 """Raised when ZIP archive creation fails.""" 

31 

32 

33class ZipExtractionError(ZipError): 

34 """Raised when ZIP archive extraction fails.""" 

35 

36 

37class ZipFileNotFoundError(ZipError): 

38 """Raised when ZIP file does not exist.""" 

39 

40 

41class ZipFileCorruptedError(ZipError): 

42 """Raised when ZIP file is corrupted or cannot be opened.""" 

43 

44 

45class ZipPathError(ZipError): 

46 """Raised when source path for zipping is invalid.""" 

47 

48 

49class ZipProgressError(ZipError): 

50 """Raised when ZIP operation progress tracking fails.""" 

51 

52 

53class ZipCompressionError(ZipError): 

54 """Raised when ZIP compression fails."""