/**
* @author Fabien Potencier <fabien@symfony.com>
*
* @final
*/
class ExceptionDataCollector extends DataCollector
{ public function collect(Request
$request, Response
$response, \Throwable
$exception = null
): void
{ if (null !==
$exception) { $this->data =
[ 'exception' => FlattenException::
createWithDataRepresentation($exception),
];
} } public function hasException(): bool
{ return isset($this->data
['exception'
]);
} public function getException(): \Exception|FlattenException
{