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

10 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-16 16:37 +0000

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

2# UPLOADER_EXCEPTIONS - Uploader operation exceptions 

3# Project: ezcompiler 

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

5 

6""" 

7Uploader exceptions - Specialized exceptions for uploader operations. 

8 

9This module defines exceptions for various uploader-related failures 

10used by UploaderUtils and uploader implementations. 

11""" 

12 

13from __future__ import annotations 

14 

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

16# IMPORTS 

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

18from ._base import EzCompilerError 

19 

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

21# EXCEPTIONS 

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

23 

24 

25# Canonical UploadError: defined here (utils subtree), under EzCompilerError. 

26# The services subtree re-imports it (services/_service_exceptions.py) instead 

27# of defining its own — a single `UploadError` shared by all the code. 

28class UploadError(EzCompilerError): 

29 """Base exception for upload operation errors (canonical).""" 

30 

31 

32class SourcePathError(UploadError): 

33 """Raised when source path for upload is invalid or inaccessible.""" 

34 

35 

36class UploaderTypeError(UploadError): 

37 """Raised when upload type is not supported.""" 

38 

39 

40class ServerConfigError(UploadError): 

41 """Raised when server configuration is invalid.""" 

42 

43 

44class BackupGenerationError(UploadError): 

45 """Raised when backup path generation fails.""" 

46 

47 

48class UploadConnectionError(UploadError): 

49 """Raised when connection to upload destination fails.""" 

50 

51 

52class UploadAuthenticationError(UploadError): 

53 """Raised when authentication for upload fails.""" 

54 

55 

56class UploadTimeoutError(UploadError): 

57 """Raised when upload operation times out."""