Skip to content

Commit b3cd267

Browse files
Partial revert of previous PR
1 parent a60c355 commit b3cd267

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
1919
use Symfony\Component\HttpFoundation\Request;
2020
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
21-
use Symfony\Component\Routing\Exception\RouteNotFoundException;
2221
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2322

2423
/**
@@ -194,8 +193,8 @@ public function toolbarAction(Request $request, $token)
194193
$url = null;
195194
try {
196195
$url = $this->generator->generate('_profiler', array('token' => $token));
197-
} catch (RouteNotFoundException $e) {
198-
// the named route doesn't exist => the profiler is not enabled
196+
} catch (\Exception $e) {
197+
// the profiler is not enabled
199198
}
200199

201200
return new Response($this->twig->render('@WebProfiler/Profiler/toolbar.html.twig', array(

0 commit comments

Comments
 (0)