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
« 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# ///////////////////////////////////////////////////////////////
6"""
7Uploader exceptions - Specialized exceptions for uploader operations.
9This module defines exceptions for various uploader-related failures
10used by UploaderUtils and uploader implementations.
11"""
13from __future__ import annotations
15# ///////////////////////////////////////////////////////////////
16# IMPORTS
17# ///////////////////////////////////////////////////////////////
18from ._base import EzCompilerError
20# ///////////////////////////////////////////////////////////////
21# EXCEPTIONS
22# ///////////////////////////////////////////////////////////////
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)."""
32class SourcePathError(UploadError):
33 """Raised when source path for upload is invalid or inaccessible."""
36class UploaderTypeError(UploadError):
37 """Raised when upload type is not supported."""
40class ServerConfigError(UploadError):
41 """Raised when server configuration is invalid."""
44class BackupGenerationError(UploadError):
45 """Raised when backup path generation fails."""
48class UploadConnectionError(UploadError):
49 """Raised when connection to upload destination fails."""
52class UploadAuthenticationError(UploadError):
53 """Raised when authentication for upload fails."""
56class UploadTimeoutError(UploadError):
57 """Raised when upload operation times out."""