4 * This file is part of the Behat.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
11 namespace Behat\Behat\HelperContainer\Exception;
13 use Interop\Container\Exception\NotFoundException;
14 use InvalidArgumentException;
17 * Represents an exception thrown when service ID is not found inside the container.
19 * @author Konstantin Kudryashov <ever.zet@gmail.com>
21 final class ServiceNotFoundException extends InvalidArgumentException implements HelperContainerException, NotFoundException
29 * Initializes exception.
31 * @param string $message
32 * @param string $serviceId
34 public function __construct($message, $serviceId)
36 $this->serviceId = $serviceId;
38 parent::__construct($message);
42 * Returns service ID that caused exception.
46 public function getServiceId()
48 return $this->serviceId;