xref: /webtrees/app/Http/Exceptions/HttpNotFoundException.php (revision 2c6f1bd538f46b93645991518398bb087011cb42)
181b729d3SGreg Roach<?php
281b729d3SGreg Roach
381b729d3SGreg Roach/**
481b729d3SGreg Roach * webtrees: online genealogy
5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
681b729d3SGreg Roach * This program is free software: you can redistribute it and/or modify
781b729d3SGreg Roach * it under the terms of the GNU General Public License as published by
881b729d3SGreg Roach * the Free Software Foundation, either version 3 of the License, or
981b729d3SGreg Roach * (at your option) any later version.
1081b729d3SGreg Roach * This program is distributed in the hope that it will be useful,
1181b729d3SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1281b729d3SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1381b729d3SGreg Roach * GNU General Public License for more details.
1481b729d3SGreg Roach * You should have received a copy of the GNU General Public License
1581b729d3SGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
1681b729d3SGreg Roach */
1781b729d3SGreg Roach
1881b729d3SGreg Roachdeclare(strict_types=1);
1981b729d3SGreg Roach
2081b729d3SGreg Roachnamespace Fisharebest\Webtrees\Http\Exceptions;
2181b729d3SGreg Roach
22fbdfd3a9SGreg Roachuse Fig\Http\Message\StatusCodeInterface;
2381b729d3SGreg Roachuse Fisharebest\Webtrees\I18N;
2481b729d3SGreg Roach
2581b729d3SGreg Roach/**
2681b729d3SGreg Roach * Application level exceptions.
2781b729d3SGreg Roach */
2881b729d3SGreg Roachclass HttpNotFoundException extends HttpException
2981b729d3SGreg Roach{
3081b729d3SGreg Roach    /**
3181b729d3SGreg Roach     * @param string|null $message
3281b729d3SGreg Roach     */
33*2c6f1bd5SGreg Roach    public function __construct(string|null $message = null)
3481b729d3SGreg Roach    {
3581b729d3SGreg Roach        $message ??= I18N::translate('You do not have permission to view this page.');
3681b729d3SGreg Roach
37fbdfd3a9SGreg Roach        parent::__construct($message, StatusCodeInterface::STATUS_NOT_FOUND);
3881b729d3SGreg Roach    }
3981b729d3SGreg Roach}
40