diff --git a/EventListener/ExceptionListener.php b/EventListener/ExceptionListener.php index b8446496a2..996c366f61 100644 --- a/EventListener/ExceptionListener.php +++ b/EventListener/ExceptionListener.php @@ -72,8 +72,13 @@ public function showExceptionPageAction(FlattenException $exception) */ protected function logException(\Exception $exception, $message, $original = true) { + if (!$exception instanceof BaseException) { + parent::logException($exception, $message, $original); + + return; + } + if (null !== $this->logger) { - /** @var BaseException $exception */ if ($exception->getStatusCode() >= 500) { $this->logger->critical($message, array('exception' => $exception)); } else {