Files
Pac-cogs/videoarchiver/utils/exceptions.py
pacnpal 767f1140d1 Fixed FFmpeg Management:
Updated extraction logic to handle BtbN's new archive structure with binaries in bin directory
Added fallback to old structure for backward compatibility
Improved binary verification and permissions handling
Enhanced error handling during extraction and verification
Fixed Exception Handling:

Added missing FileCleanupError exception
Updated file operations to use proper exceptions
Improved error propagation and logging
Better cleanup error handling
Improved Resource Management:

Better cleanup of failed downloads
Proper handling of temporary files
Enhanced queue management
Improved file deletion with retries
Enhanced Error Reporting:

More detailed error messages
Better logging of cleanup operations
Proper error propagation through the system
Improved user feedback
The system now:

Properly handles FFmpeg's new archive structure
Better manages file operations and cleanup
Provides more detailed error messages
Cleans up resources properly
Shows appropriate error messages for different failure types
2024-11-15 04:30:03 +00:00

54 lines
1.2 KiB
Python

"""Custom exceptions for VideoArchiver"""
class VideoArchiverError(Exception):
"""Base exception for VideoArchiver errors"""
pass
class VideoDownloadError(VideoArchiverError):
"""Error downloading video"""
pass
class VideoProcessingError(VideoArchiverError):
"""Error processing video"""
pass
class VideoVerificationError(VideoArchiverError):
"""Error verifying video"""
pass
class VideoUploadError(VideoArchiverError):
"""Error uploading video"""
pass
class VideoCleanupError(VideoArchiverError):
"""Error cleaning up video files"""
pass
class FileCleanupError(VideoArchiverError):
"""Error cleaning up files"""
pass
class ConfigurationError(VideoArchiverError):
"""Error in configuration"""
pass
class PermissionError(VideoArchiverError):
"""Error with file permissions"""
pass
class NetworkError(VideoArchiverError):
"""Error with network operations"""
pass
class ResourceError(VideoArchiverError):
"""Error with system resources"""
pass
class QueueError(VideoArchiverError):
"""Error with queue operations"""
pass
class ComponentError(VideoArchiverError):
"""Error with component initialization or cleanup"""
pass