2017-01-16 12:30:18 +01:00
|
|
|
<?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;
|
2017-05-09 18:12:15 +02:00
|
|
|
$this->message = empty($message) ? t('Error accessing') : $message;
|
2017-01-16 12:30:18 +01:00
|
|
|
$this->message .= ' "' . $this->path .'"';
|
|
|
|
}
|
|
|
|
}
|