Move remaining LoadBalancer classes to Rdbms
[mediawiki.git] / includes / services / ServiceAlreadyDefinedException.php
blobc6344d3955c128341294915e8566330cf5f9e692
1 <?php
2 namespace MediaWiki\Services;
4 use Exception;
5 use RuntimeException;
7 /**
8 * Exception thrown when a service was already defined, but the
9 * caller expected it to not exist.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 * http://www.gnu.org/copyleft/gpl.html
26 * @file
28 * @since 1.27
31 /**
32 * Exception thrown when a service was already defined, but the
33 * caller expected it to not exist.
35 class ServiceAlreadyDefinedException extends RuntimeException {
37 /**
38 * @param string $serviceName
39 * @param Exception|null $previous
41 public function __construct( $serviceName, Exception $previous = null ) {
42 parent::__construct( "Service already defined: $serviceName", 0, $previous );