MyShaarli/application/exceptions/IOException.php
VirtualTam f3d2f25794 namespacing: \Shaarli\Exceptions\IOException
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
2019-01-12 22:47:48 +01:00

26 lines
600 B
PHP

<?php
namespace Shaarli\Exceptions;
use Exception;
/**
* 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) ? t('Error accessing') : $message;
$this->message .= ' "' . $this->path . '"';
}
}