aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/FileUtils.php
blob: 6cac9825de24a1ac4aec018cc54017e822064ef7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
 * Exception class thrown when a filesystem access failure happens
 */
class IOException extends Exception
{
    private $path;

    /**
     * Construct a new IOException
     *
     * @param string $path    path to the resource that cannot be accessed
     * @param string $message Custom exception message.
     */
    public function __construct($path, $message = '')
    {
        $this->path = $path;
        $this->message = empty($message) ? 'Error accessing' : $message;
        $this->message .= PHP_EOL . $this->path;
    }
}