mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
Exception Hierarchy:
Created proper exception hierarchy in utils/exceptions.py Fixed circular imports in utils/init.py Ensured consistent exception imports across all files Properly aliased FFmpeg exceptions to avoid naming conflicts Import Fixes: Updated processor.py to use VerificationError from ffmpeg.exceptions Fixed video_downloader.py to use correct exception imports Created root exceptions.py for better organization Ensured consistent exception usage across the codebase Error Handling: Improved error propagation through the system Better error messages for different failure types Enhanced cleanup on errors More detailed logging of error conditions FFmpeg Integration: Fixed FFmpeg binary verification Better error handling for FFmpeg operations Improved cleanup of failed operations Enhanced logging of FFmpeg-related errors
This commit is contained in:
@@ -31,7 +31,10 @@ from videoarchiver.utils.exceptions import (
|
||||
from videoarchiver.ffmpeg.exceptions import (
|
||||
FFmpegError,
|
||||
CompressionError,
|
||||
VideoVerificationError as FFmpegVerificationError
|
||||
VerificationError,
|
||||
FFprobeError,
|
||||
TimeoutError,
|
||||
handle_ffmpeg_error
|
||||
)
|
||||
from videoarchiver.enhanced_queue import EnhancedVideoQueueManager
|
||||
|
||||
@@ -132,7 +135,7 @@ class VideoProcessor:
|
||||
if not success:
|
||||
raise VideoDownloadError(error)
|
||||
|
||||
except (FFmpegError, CompressionError, FFmpegVerificationError) as e:
|
||||
except (FFmpegError, CompressionError, VerificationError) as e:
|
||||
raise VideoProcessingError(f"FFmpeg error: {str(e)}")
|
||||
except Exception as e:
|
||||
if isinstance(e, (VideoDownloadError, VideoProcessingError)):
|
||||
|
||||
Reference in New Issue
Block a user