ldc-boutique-cnc-sable/app/Exceptions/Helpers/FileStorageOperationException.php

19 lines
536 B
PHP
Raw Permalink Normal View History

2026-06-14 21:32:07 +02:00
<?php
declare(strict_types=1);
namespace App\Exceptions\Helpers;
class FileStorageOperationException extends \RuntimeException
{
public static function copyFailed(string $sourcePath, string $destinationPath): self
{
return new self(sprintf('Failed to copy file %s to %s', $sourcePath, $destinationPath));
}
public static function cannotGenerateUniqueFilename(string $folderPath, string $filename): self
{
return new self("Failed to have a unique filename for {$folderPath}/{$filename}");
}
}