2015-11-11 22:49:58 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Exception class thrown when a filesystem access failure happens
|
|
|
|
*/
|
|
|
|
class IOException extends Exception
|
|
|
|
{
|
|
|
|
private $path;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Construct a new IOException
|
|
|
|
*
|
2016-05-18 21:48:24 +02:00
|
|
|
* @param string $path path to the resource that cannot be accessed
|
|
|
|
* @param string $message Custom exception message.
|
2015-11-11 22:49:58 +01:00
|
|
|
*/
|
2016-05-18 21:48:24 +02:00
|
|
|
public function __construct($path, $message = '')
|
2015-11-11 22:49:58 +01:00
|
|
|
{
|
|
|
|
$this->path = $path;
|
2016-05-18 21:48:24 +02:00
|
|
|
$this->message = empty($message) ? 'Error accessing' : $message;
|
|
|
|
$this->message .= PHP_EOL . $this->path;
|
2015-11-11 22:49:58 +01:00
|
|
|
}
|
|
|
|
}
|