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\Call\Exception;
16 * Represents catchable errors raised during call execution.
18 * @author Konstantin Kudryashov <ever.zet@gmail.com>
20 final class CallErrorException extends ErrorException
22 private $levels = array(
23 E_WARNING => 'Warning',
25 E_USER_ERROR => 'User Error',
26 E_USER_WARNING => 'User Warning',
27 E_USER_NOTICE => 'User Notice',
28 E_STRICT => 'Runtime Notice',
29 E_RECOVERABLE_ERROR => 'Catchable Fatal Error',
33 * Initializes error handler exception.
35 * @param integer $level error level
36 * @param string $message error message
37 * @param string $file error file
38 * @param integer $line error line
40 public function __construct($level, $message, $file, $line)
44 '%s: %s in %s line %d',
45 isset($this->levels[$level]) ? $this->levels[$level] : $level,