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

10 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-07-04 11:22 +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# UploadError canonique : défini ici (sous-arbre utils), sous EzCompilerError. 

26# Le sous-arbre services le ré-importe (services/_service_exceptions.py) au lieu 

27# d'en redéfinir un — un seul `UploadError` partagé par tout le 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."""