X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fexceptions%2Ffile_directory%2Fclass_PathWriteProtectedException.php;h=2e4da8391e648764b81c73a707dfe23af9e5c8cd;hp=13ae3da44d38aec0c0e6fbc34f47ebbe18815554;hb=b9bfbe86c031c9d83c3670602906df191a33ba2a;hpb=5da8f717122568335b8a8ab230fa0de17e983fab diff --git a/framework/main/exceptions/file_directory/class_PathWriteProtectedException.php b/framework/main/exceptions/file_directory/class_PathWriteProtectedException.php index 13ae3da4..2e4da839 100644 --- a/framework/main/exceptions/file_directory/class_PathWriteProtectedException.php +++ b/framework/main/exceptions/file_directory/class_PathWriteProtectedException.php @@ -6,6 +6,9 @@ namespace CoreFramework\Filesystem; use CoreFramework\Filesystem\PathWriteProtectedException; use CoreFramework\Generic\FrameworkException; +// Import SPL stuff +use \SplFileInfo; + /** * An exception thrown when a path cannot be written to. * @@ -32,13 +35,13 @@ class PathWriteProtectedException extends FrameworkException { /** * The constructor * - * @param $fqfn Full-qualified file name + * @param $infoInstance An instance of a SplFileInfo class * @param $code Code number for the exception * @return void */ - public function __construct ($fqfn, $code) { + public function __construct (SplFileInfo $infoInstance, $code) { // Add a message around the missing class - $message = sprintf('Path %s cannot be written to. Please check permissions.', dirname($fqfn)); + $message = sprintf('Path "%s" cannot be written to. Please check permissions.', $infoInstance->getPath()); // Call parent constructor parent::__construct($message, $code);