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\Exception\Stringer;
13 use Behat\Testwork\Call\Exception\CallErrorException;
14 use Behat\Testwork\Exception\TestworkException;
18 * Strings Testwork exceptions.
20 * @author Konstantin Kudryashov <ever.zet@gmail.com>
22 final class TestworkExceptionStringer implements ExceptionStringer
27 public function supportsException(Exception $exception)
29 return $exception instanceof TestworkException || $exception instanceof CallErrorException;
35 public function stringException(Exception $exception, $verbosity)
37 return trim($exception->getMessage());