]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - application/exceptions/IOException.php
Update Static Analysis documentation
[github/shaarli/Shaarli.git] / application / exceptions / IOException.php
1 <?php
2
3 namespace Shaarli\Exceptions;
4
5 use Exception;
6
7 /**
8 * Exception class thrown when a filesystem access failure happens
9 */
10 class IOException extends Exception
11 {
12 private $path;
13
14 /**
15 * Construct a new IOException
16 *
17 * @param string $path path to the resource that cannot be accessed
18 * @param string $message Custom exception message.
19 */
20 public function __construct($path, $message = '')
21 {
22 $this->path = $path;
23 $this->message = empty($message) ? t('Error accessing') : $message;
24 $this->message .= ' "' . $this->path . '"';
25 }
26 }