Improve error handling in ShutdownHandler by logging warnings for cleanup failures

This commit is contained in:
netkas 2025-03-11 13:56:37 -04:00
parent 487eb70b0b
commit ead20f7924
Signed by: netkas
GPG key ID: 4D8629441B76E4CC
2 changed files with 3 additions and 3 deletions

View file

@ -11,6 +11,7 @@ This update introduces a quality of life improvement
### Changed
- Refactor variable names for consistency and clarity in ShutdownHandler and PackageWriter classes
- Improve error handling in ShutdownHandler by logging warnings for cleanup failures
## [2.1.6] - 2024-10-29

View file

@ -68,16 +68,15 @@
if(count(self::$cleanupPaths) > 0)
{
$filesystem = new Filesystem();
foreach(self::$cleanupPaths as $path)
{
try
{
//$filesystem->remove($path);
$filesystem->remove($path);
}
catch(Exception $e)
{
// ignore
Console::outWarning('An error occurred while cleaning up temporary path "' . $path . '", ' . $e->getMessage());
}
}
}