composer package updates
[openemr.git] / vendor / symfony / debug / Exception / FatalThrowableError.php
blobfafc92263e7045cb240ca069ac20cd0ed747825c
1 <?php
3 /*
4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Debug\Exception;
14 /**
15 * Fatal Throwable Error.
17 * @author Nicolas Grekas <p@tchwork.com>
19 class FatalThrowableError extends FatalErrorException
21 public function __construct(\Throwable $e)
23 if ($e instanceof \ParseError) {
24 $message = 'Parse error: '.$e->getMessage();
25 $severity = E_PARSE;
26 } elseif ($e instanceof \TypeError) {
27 $message = 'Type error: '.$e->getMessage();
28 $severity = E_RECOVERABLE_ERROR;
29 } else {
30 $message = $e->getMessage();
31 $severity = E_ERROR;
34 \ErrorException::__construct(
35 $message,
36 $e->getCode(),
37 $severity,
38 $e->getFile(),
39 $e->getLine(),
40 $e->getPrevious()
43 $this->setTrace($e->getTrace());