Use dedicated exceptions if unlinking failed for reasons other than the
file not existing
This commit is contained in:
18
exceptions/MDFilePermissionsException.php
Normal file
18
exceptions/MDFilePermissionsException.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?PHP
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Reports a failure due to insufficient permissions in the file system.
|
||||
*/
|
||||
final class MDFilePermissionsException extends Exception {
|
||||
/**
|
||||
* Error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
return 'Insufficient file system permissions';
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user