Преглед на файлове

[FrameworkBundle] changed the ExceptionListener to re-thrown an exception when there is an exception thrown during processing

Fabien Potencier преди 14 години
родител
ревизия
155b120d92
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      src/Symfony/Bundle/FrameworkBundle/Debug/ExceptionListener.php

+ 2 - 1
src/Symfony/Bundle/FrameworkBundle/Debug/ExceptionListener.php

@@ -82,7 +82,8 @@ class ExceptionListener
                 $this->logger->err(sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage()));
             }
 
-            return false;
+            // re-throw the exception as this is a catch-all
+            throw new \RuntimeException(sprintf('Exception thrown when handling an exception.', 0, $e));
         }
 
         $event->setReturnValue($response);