Skip to content

Commit

Permalink
Pass previous exception to FatalErrorException
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Montoya committed Jun 6, 2018
1 parent efe9beb commit 7f9780b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Expand Up @@ -26,6 +26,9 @@ public function __construct($message, \ErrorException $previous)
$previous->getSeverity(),
$previous->getFile(),
$previous->getLine(),
null,
true,
null,
$previous->getPrevious()
);
$this->setTrace($previous->getTrace());
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Debug/Exception/FatalErrorException.php
Expand Up @@ -35,9 +35,9 @@ class FatalErrorException extends \ErrorException
*/
class FatalErrorException extends LegacyFatalErrorException
{
public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true, array $trace = null)
public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true, array $trace = null, $previous = null)
{
parent::__construct($message, $code, $severity, $filename, $lineno);
parent::__construct($message, $code, $severity, $filename, $lineno, $previous);

if (null !== $trace) {
if (!$traceArgs) {
Expand Down
Expand Up @@ -26,6 +26,9 @@ public function __construct($message, \ErrorException $previous)
$previous->getSeverity(),
$previous->getFile(),
$previous->getLine(),
null,
true,
null,
$previous->getPrevious()
);
$this->setTrace($previous->getTrace());
Expand Down
Expand Up @@ -26,6 +26,9 @@ public function __construct($message, \ErrorException $previous)
$previous->getSeverity(),
$previous->getFile(),
$previous->getLine(),
null,
true,
null,
$previous->getPrevious()
);
$this->setTrace($previous->getTrace());
Expand Down

0 comments on commit 7f9780b

Please sign in to comment.