]>
Commit | Line | Data |
---|---|---|
2e28269b V |
1 | <?php |
2 | /** | |
3 | * Exception class thrown when a filesystem access failure happens | |
4 | */ | |
5 | class IOException extends Exception | |
6 | { | |
7 | private $path; | |
8 | ||
9 | /** | |
10 | * Construct a new IOException | |
11 | * | |
684e662a A |
12 | * @param string $path path to the resource that cannot be accessed |
13 | * @param string $message Custom exception message. | |
2e28269b | 14 | */ |
684e662a | 15 | public function __construct($path, $message = '') |
2e28269b V |
16 | { |
17 | $this->path = $path; | |
684e662a A |
18 | $this->message = empty($message) ? 'Error accessing' : $message; |
19 | $this->message .= PHP_EOL . $this->path; | |
2e28269b V |
20 | } |
21 | } |