xref: /webtrees/app/Http/Exceptions/HttpServiceUnavailableException.php (revision d11be7027e34e3121be11cc025421873364403f9)
181b729d3SGreg Roach<?php
281b729d3SGreg Roach
381b729d3SGreg Roach/**
481b729d3SGreg Roach * webtrees: online genealogy
5*d11be702SGreg 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
2281b729d3SGreg Roachuse Fig\Http\Message\StatusCodeInterface;
2381b729d3SGreg Roach
2481b729d3SGreg Roach/**
2581b729d3SGreg Roach * Exception thrown when the server is overloaded.
2681b729d3SGreg Roach */
2781b729d3SGreg Roachclass HttpServiceUnavailableException extends HttpException
2881b729d3SGreg Roach{
2981b729d3SGreg Roach    /**
3081b729d3SGreg Roach     * @param string $message
3181b729d3SGreg Roach     */
3281b729d3SGreg Roach    public function __construct(string $message)
3381b729d3SGreg Roach    {
3481b729d3SGreg Roach        parent::__construct($message, StatusCodeInterface::STATUS_SERVICE_UNAVAILABLE);
3581b729d3SGreg Roach    }
3681b729d3SGreg Roach}
37