Throw a specific exception if MD_STD::mkdir fails

Close #8
This commit is contained in:
jrenslin committed 2023-11-27 01:30:43 +01:00
1 parent db31822a3f
commit 8006695093
2 files changed
+19 -1

No files matched your search

+1 -1
View File
@@ -71,7 +71,7 @@ public static function mkdir(string $pathname, int $mode = 0775, bool $recursive
return;
}
if (\mkdir($pathname, $mode, $recursive) === false) {
throw new Exception("Failed to create directory: $pathname");
throw new MDFailedToCreateDirectory("Failed to create directory: $pathname");
}
}