X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FFileUtils.php;h=6cac9825de24a1ac4aec018cc54017e822064ef7;hb=fdf88d194874a533cf3a8de3d317d70018aa8a62;hp=6a12ef0e15cf0d338895677519cff7f0cfdf6ea0;hpb=0def004963c62ff1edfce16272a87ba9f0c87e16;p=github%2Fshaarli%2FShaarli.git diff --git a/application/FileUtils.php b/application/FileUtils.php index 6a12ef0e..6cac9825 100644 --- a/application/FileUtils.php +++ b/application/FileUtils.php @@ -9,11 +9,13 @@ class IOException extends Exception /** * Construct a new IOException * - * @param string $path path to the ressource that cannot be accessed + * @param string $path path to the resource that cannot be accessed + * @param string $message Custom exception message. */ - public function __construct($path) + public function __construct($path, $message = '') { $this->path = $path; - $this->message = 'Error accessing '.$this->path; + $this->message = empty($message) ? 'Error accessing' : $message; + $this->message .= PHP_EOL . $this->path; } }