3 * GNU social - a federating social network
4 * Copyright (C) 2014, Free Software Foundation, Inc.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 if (!defined('GNUSOCIAL')) { exit(1); }
23 * Parent class for an exception when trying to do something that was
24 * probably already done.
26 * This is a common case for example when remote sites are not up to
27 * date with our database. For example subscriptions, where a remote
28 * user may be unsubscribed from our user, but they request it anyway.
30 * This exception is usually caught in a manner that lets the execution
31 * continue _as if_ the desired action did what it was supposed to do.
35 * @author Mikael Nordfeldth <mmn@hethane.se>
36 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
37 * @link http://gnu.io/
40 class AlreadyFulfilledException extends ServerException
42 public function __construct($msg=null)
45 // TRANS: Exception text when attempting to perform something which seems already done.
46 $msg = _('Trying to do something that was already done.');
49 parent::__construct($msg, 409);