4 * This file is part of the Behat Testwork.
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 environment isolation process.
19 * @author Konstantin Kudryashov <ever.zet@gmail.com>
21 final class EnvironmentIsolationException extends RuntimeException implements EnvironmentException
33 * Initializes exception.
35 * @param string $message
36 * @param Environment $environment
37 * @param mixed $testSubject
39 public function __construct($message, Environment $environment, $testSubject = null)
41 $this->environment = $environment;
42 $this->subject = $testSubject;
44 parent::__construct($message);
48 * Returns environment that caused exception.
52 public function getEnvironment()
54 return $this->environment;
58 * Returns test subject that caused exception.
62 public function getSubject()
64 return $this->subject;