add exception handler

This commit is contained in:
Simon Vieille 2021-05-29 17:53:52 +02:00
parent b80a8e00ee
commit 97b531e205

View file

@ -11,6 +11,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\HttpClient\Exception\ClientException; use Symfony\Component\HttpClient\Exception\ClientException;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpClient\Exception\TransportException;
/** /**
* class SymfonyCacheManager. * class SymfonyCacheManager.
@ -49,6 +50,7 @@ class SymfonyCacheManager
// Hack: used to regenerate cache of url generator // Hack: used to regenerate cache of url generator
$this->httpClient->request('POST', $pingUrl); $this->httpClient->request('POST', $pingUrl);
} catch (ClientException $e) { } catch (ClientException $e) {
} catch (TransportException $e) {
} }
} }