gnu-social/lib/filenotstoredlocallyexception.php
Mikael Nordfeldth f02d32b718 Reworked File->getUrl to throw exception
In case you require a local URL and one can't be generated, throw
FileNotStoredLocallyException(File $file)
2016-07-07 00:44:50 +02:00

16 lines
436 B
PHP

<?php
if (!defined('GNUSOCIAL')) { exit(1); }
class FileNotStoredLocallyException extends ServerException
{
public $file = null;
public function __construct(File $file)
{
$this->file = $file;
common_debug('Requested local URL for a file that is not stored locally with id=='._ve($this->file->getID()));
parent::__construct(_('Requested local URL for a file that is not stored locally.'));
}
}