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\Testwork\Environment\Exception;
13 use Behat\Testwork\Environment\Environment;
17 * Represents exception thrown during an environment read.
19 * @author Konstantin Kudryashov <ever.zet@gmail.com>
21 final class EnvironmentReadException extends RuntimeException implements EnvironmentException
29 * Initializes exception.
31 * @param string $message
32 * @param Environment $environment
34 public function __construct($message, Environment $environment)
36 $this->environment = $environment;
38 parent::__construct($message);
42 * Returns environment that caused exception.
46 public function getEnvironment()
48 return $this->environment;