]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/FileUtils.php
Replace $GLOBALS configuration with the configuration manager in the whole code base
[github/shaarli/Shaarli.git] / application / FileUtils.php
index 6a12ef0e15cf0d338895677519cff7f0cfdf6ea0..6cac9825de24a1ac4aec018cc54017e822064ef7 100644 (file)
@@ -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;
     }
 }