Add the referer information that could help you findout where's the link comes from.

This commit is contained in:
scourgen 2013-06-07 15:30:20 +08:00 committed by Fabien Potencier
parent bcd7ab1eae
commit bb5954eed0

View File

@ -111,7 +111,7 @@ class RouterListener implements EventSubscriberInterface
unset($parameters['_controller']);
$request->attributes->set('_route_params', $parameters);
} catch (ResourceNotFoundException $e) {
$message = sprintf('No route found for "%s %s"', $request->getMethod(), $request->getPathInfo());
$message = sprintf('No route found for "%s %s" (from %s)', $request->getMethod(), $request->getPathInfo(), $request->headers->get('referer'));
throw new NotFoundHttpException($message, $e);
} catch (MethodNotAllowedException $e) {