-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add error handling and temp file cleanup in PNG optimization
This PR improves the reliability of PNG image optimization by adding proper error handling and temporary file cleanup. Changes made: - Added try-catch block around PNG optimization logic - Implemented cleanup of temporary files in case of errors - Ensures temporary files are not left on disk even if optimization fails - Maintains original error propagation for proper error reporting This change prevents potential disk space leaks and improves the robustness of the image optimization process.
- Loading branch information
1 parent
806f7be
commit d9f45d4
Showing
1 changed file
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters