ControllerNotFound: Changed log level from info to error. Also moved
throw exception code block up, to prevent the message from beeing logged multiple times.
This commit is contained in:
parent
7c29e8881f
commit
529381b378
@ -76,17 +76,17 @@ class ControllerNameParser
|
|||||||
|
|
||||||
private function handleControllerNotFoundException($bundle, $controller, array $logs)
|
private function handleControllerNotFoundException($bundle, $controller, array $logs)
|
||||||
{
|
{
|
||||||
if (null !== $this->logger) {
|
|
||||||
foreach ($logs as $log) {
|
|
||||||
$this->logger->info($log);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// just one log, return it as the exception
|
// just one log, return it as the exception
|
||||||
if (1 == count($logs)) {
|
if (1 == count($logs)) {
|
||||||
throw new \InvalidArgumentException($logs[0]);
|
throw new \InvalidArgumentException($logs[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (null !== $this->logger) {
|
||||||
|
foreach ($logs as $log) {
|
||||||
|
$this->logger->error($log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// many logs, use a message that mentions each searched bundle
|
// many logs, use a message that mentions each searched bundle
|
||||||
$names = array();
|
$names = array();
|
||||||
foreach ($this->kernel->getBundle($bundle, false) as $b) {
|
foreach ($this->kernel->getBundle($bundle, false) as $b) {
|
||||||
|
Reference in New Issue
Block a user