MediaWiki REL1_34
ServiceAlreadyDefinedException.php
Go to the documentation of this file.
1<?php
2
3namespace Wikimedia\Services;
4
5use Exception;
6use Psr\Container\ContainerExceptionInterface;
7use RuntimeException;
8
37class ServiceAlreadyDefinedException extends RuntimeException
38 implements ContainerExceptionInterface {
39
44 public function __construct( $serviceName, Exception $previous = null ) {
45 parent::__construct( "Service already defined: $serviceName", 0, $previous );
46 }
47
48}
49
54class_alias( ServiceAlreadyDefinedException::class,
55 'MediaWiki\Services\ServiceAlreadyDefinedException' );
Exception thrown when a service was already defined, but the caller expected it to not exist.