Add class MDFileIsNotWritable
This commit is contained in:
parent
bd2f425afe
commit
96f5dd8108
24
exceptions/updates/MDFileIsNotWritable.php
Normal file
24
exceptions/updates/MDFileIsNotWritable.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?PHP
|
||||
/**
|
||||
* This file contains an exception class for notifying about non-writable directories.
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Custom exception class for throwing if a given file path is not writable.
|
||||
*/
|
||||
final class MDFileIsNotWritable extends Exception {
|
||||
/**
|
||||
* Error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'This file or directory cannot be written: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user