Avoid nested exceptions if errors occur when generating file links

This commit is contained in:
Yonel Ceruto 2019-10-22 23:57:47 -04:00
parent 48282ce80f
commit d91a5a067d

View File

@ -13,7 +13,6 @@ namespace Symfony\Component\HttpKernel\Debug;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\Exception\ExceptionInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/**
@ -80,7 +79,7 @@ class FileLinkFormatter
{
try {
return $router->generate($routeName).$queryString;
} catch (ExceptionInterface $e) {
} catch (\Throwable $e) {
return null;
}
}