public function showAction(Request $request, FlattenException $exception, DebugLoggerInterface $logger = null, $format = 'html')
{
$urlMatcher = $this->container->get('router');
try {
$context = new \Symfony\Component\Routing\RequestContext($request->getPathInfo(), $request->getMethod());
$urlMatcher->setContext($context);
$match = $urlMatcher->match($context->getBaseUrl());
} catch (\Exception $e) {
return;
}
if (strpos($match['_route'], 'newscoop_gimme_') === false) {
// Skip newscoop rest api exceptions
$logger = $this->container->get('monolog.logger.sentry');
$logger->log(\Psr\Log\LogLevel::CRITICAL, 'Uncaught exception', array('exception' => $exception));
return;
}
return parent::showAction($request, $exception, $logger, $format);
}