]> git.immae.eu Git - github/shaarli/Shaarli.git/blame_incremental - application/exceptions/IOException.php
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / application / exceptions / IOException.php
... / ...
CommitLineData
1<?php
2
3namespace Shaarli\Exceptions;
4
5use Exception;
6
7/**
8 * Exception class thrown when a filesystem access failure happens
9 */
10class 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}