]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - application/exceptions/IOException.php
Apply PHP Code Beautifier on source code for linter automatic fixes
[github/shaarli/Shaarli.git] / application / exceptions / IOException.php
CommitLineData
b2306b0c 1<?php
53054b2b 2
f3d2f257
V
3namespace Shaarli\Exceptions;
4
5use Exception;
b2306b0c
A
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;
12266213 23 $this->message = empty($message) ? t('Error accessing') : $message;
f3d2f257 24 $this->message .= ' "' . $this->path . '"';
b2306b0c
A
25 }
26}