mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 19:01:06 -05:00
Exception Hierarchy:
Added missing exceptions to utils/exceptions.py: ResourceExhaustedError ProcessingError CleanupError FileOperationError Fixed exception imports in exceptions.py Added proper re-exports of all exceptions Maintained backward compatibility aliases URL Processing: Added pre-filtering for URLs before yt-dlp checks Added common video platform patterns Reduced error logging noise Improved URL validation efficiency Error Handling: Added proper error types for all operations Enhanced error messages with context Added resource exhaustion checks Improved error propagation Code Organization: Centralized exceptions in utils/exceptions.py Proper re-exports in exceptions.py Consistent error handling across components Better error type hierarchy
This commit is contained in:
@@ -6,23 +6,43 @@ from .utils.exceptions import (
|
||||
VideoVerificationError,
|
||||
QueueError,
|
||||
FileCleanupError,
|
||||
ResourceExhaustedError,
|
||||
ProcessingError,
|
||||
CleanupError,
|
||||
FileOperationError,
|
||||
VideoDownloadError,
|
||||
VideoProcessingError,
|
||||
VideoUploadError,
|
||||
VideoCleanupError,
|
||||
PermissionError,
|
||||
NetworkError,
|
||||
ResourceError,
|
||||
ComponentError,
|
||||
DiscordAPIError,
|
||||
)
|
||||
|
||||
# Re-export base exceptions
|
||||
# Re-export all exceptions
|
||||
__all__ = [
|
||||
'VideoArchiverError',
|
||||
'ConfigurationError',
|
||||
'VideoVerificationError',
|
||||
'QueueError',
|
||||
'FileCleanupError',
|
||||
'UpdateError',
|
||||
'ResourceExhaustedError',
|
||||
'ProcessingError',
|
||||
'ConfigError',
|
||||
'CleanupError',
|
||||
'FileOperationError',
|
||||
'VideoDownloadError',
|
||||
'VideoProcessingError',
|
||||
'VideoUploadError',
|
||||
'VideoCleanupError',
|
||||
'PermissionError',
|
||||
'NetworkError',
|
||||
'ResourceError',
|
||||
'ComponentError',
|
||||
'DiscordAPIError',
|
||||
]
|
||||
|
||||
# Alias exceptions for backward compatibility
|
||||
ProcessingError = VideoArchiverError
|
||||
ConfigError = ConfigurationError
|
||||
UpdateError = VideoVerificationError
|
||||
|
||||
Reference in New Issue
Block a user