parent
db31822a3f
commit
8006695093
18
exceptions/MDFailedToCreateDirectory.php
Normal file
18
exceptions/MDFailedToCreateDirectory.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?PHP
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Reports a failure to create a new directory.
|
||||
*/
|
||||
final class MDFailedToCreateDirectory extends Exception {
|
||||
/**
|
||||
* Error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
return 'Failed to encode JSON data.';
|
||||
|
||||
}
|
||||
}
|
|
@ -71,7 +71,7 @@ final class MD_STD {
|
|||
return;
|
||||
}
|
||||
if (\mkdir($pathname, $mode, $recursive) === false) {
|
||||
throw new Exception("Failed to create directory: $pathname");
|
||||
throw new MDFailedToCreateDirectory("Failed to create directory: $pathname");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user