1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-28 04:00:43 +02:00

Change php7 errors to exception to maintain compatability with function declaration #264 (#279)

This commit is contained in:
jamiehd
2016-06-11 13:17:26 +01:00
committed by Barry vd. Heuvel
parent 41d982b5cf
commit 91b61a53bb
2 changed files with 7 additions and 1 deletions

View File

@@ -10,7 +10,9 @@
namespace DebugBar\DataCollector;
use Error;
use Exception;
use Symfony\Component\Debug\Exception\FatalThrowableError;
/**
* Collects info about exceptions
@@ -29,6 +31,9 @@ class ExceptionsCollector extends DataCollector implements Renderable
{
$this->exceptions[] = $e;
if ($this->chainExceptions && $previous = $e->getPrevious()) {
if ($previous instanceof Error) {
$previous = new FatalThrowableError($previous);
}
$this->addException($previous);
}
}