Use dedicated exceptions if unlinking failed for reasons other than the

file not existing
This commit is contained in:
jrenslin committed 2025-03-25 14:57:29 +01:00
1 parent b9d82d672a
commit 5433811176
3 files changed
+45 -1

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
<?PHP
declare(strict_types = 1);
/**
* Reports a failure to create a new directory.
*/
final class MDFailedToDeleteFile extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'Failed to delete file';
}
}