4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\DependencyInjection\Exception;
15 * This exception is thrown when you try to create a service of an inactive scope.
17 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
19 class InactiveScopeException extends RuntimeException
24 public function __construct($serviceId, $scope, \Exception $previous = null)
26 parent::__construct(sprintf('You cannot create a service ("%s") of an inactive scope ("%s").', $serviceId, $scope), 0, $previous);
28 $this->serviceId = $serviceId;
29 $this->scope = $scope;
32 public function getServiceId()
34 return $this->serviceId;
37 public function getScope()