Merge "maintenance: Script to rename titles for Unicode uppercasing changes"
[lhc/web/wiklou.git] / includes / libs / services / ContainerDisabledException.php
1 <?php
2
3 namespace Wikimedia\Services;
4
5 use Exception;
6 use Psr\Container\ContainerExceptionInterface;
7 use RuntimeException;
8
9 /**
10 * Exception thrown when trying to access a service on a disabled container or factory.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 * http://www.gnu.org/copyleft/gpl.html
26 *
27 * @file
28 *
29 * @since 1.27
30 */
31
32 /**
33 * Exception thrown when trying to access a service on a disabled container or factory.
34 */
35 class ContainerDisabledException extends RuntimeException
36 implements ContainerExceptionInterface {
37
38 /**
39 * @param Exception|null $previous
40 */
41 public function __construct( Exception $previous = null ) {
42 parent::__construct( 'Container disabled!', 0, $previous );
43 }
44
45 }
46
47 /**
48 * Retain the old class name for backwards compatibility.
49 * @deprecated since 1.33
50 */
51 class_alias( ContainerDisabledException::class, 'MediaWiki\Services\ContainerDisabledException' );