updated-packages
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\DataCollector;
|
||||
|
||||
use Symfony\Component\Debug\Exception\FlattenException;
|
||||
use Symfony\Component\ErrorHandler\Exception\FlattenException;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
@@ -19,18 +19,24 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
* ExceptionDataCollector.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ExceptionDataCollector extends DataCollector
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @param \Throwable|null $exception
|
||||
*/
|
||||
public function collect(Request $request, Response $response, \Exception $exception = null)
|
||||
public function collect(Request $request, Response $response/* , \Throwable $exception = null */)
|
||||
{
|
||||
$exception = 2 < \func_num_args() ? func_get_arg(2) : null;
|
||||
|
||||
if (null !== $exception) {
|
||||
$this->data = array(
|
||||
'exception' => FlattenException::create($exception),
|
||||
);
|
||||
$this->data = [
|
||||
'exception' => FlattenException::createFromThrowable($exception),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +45,7 @@ class ExceptionDataCollector extends DataCollector
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
$this->data = array();
|
||||
$this->data = [];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +61,7 @@ class ExceptionDataCollector extends DataCollector
|
||||
/**
|
||||
* Gets the exception.
|
||||
*
|
||||
* @return \Exception The exception
|
||||
* @return \Exception|FlattenException
|
||||
*/
|
||||
public function getException()
|
||||
{
|
||||
|
Reference in New Issue
Block a user