. * * @category Exception * @package GNUsocial * @author Mikael Nordfeldth * @copyright 2014 Free Software Foundation, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link https://www.gnu.org/software/social/ */ if (!defined('GNUSOCIAL')) { exit(1); } class UseFileAsThumbnailException extends UnsupportedMediaException { public $file = null; public function __construct($file_id) { $this->file = File::getKV('id', $file_id); if (!$this->file instanceof File) { throw new ServerException('No File ID supplied to exception'); } parent::__construct('Thumbnail not generated', $this->file->getPath()); } }