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