瀏覽代碼

ZF-8558: Zend_Controller_Front should re-throw exceptions instead of wrapping them in Zend_Controller_Exception

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19833 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 16 年之前
父節點
當前提交
55a753d704
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      library/Zend/Controller/Front.php

+ 3 - 6
library/Zend/Controller/Front.php

@@ -946,8 +946,7 @@ class Zend_Controller_Front
                     $dispatcher->dispatch($this->_request, $this->_response);
                 } catch (Exception $e) {
                     if ($this->throwExceptions()) {
-                        require_once 'Zend/Controller/Exception.php';
-                        throw new Zend_Controller_Exception($e->getMessage(), $e->getCode(), $e);
+                        throw $e;
                     }
                     $this->_response->setException($e);
                 }
@@ -959,8 +958,7 @@ class Zend_Controller_Front
             } while (!$this->_request->isDispatched());
         } catch (Exception $e) {
             if ($this->throwExceptions()) {
-                require_once 'Zend/Controller/Exception.php';
-                throw new Zend_Controller_Exception($e->getMessage(), $e->getCode(), $e);
+                throw $e;
             }
 
             $this->_response->setException($e);
@@ -973,8 +971,7 @@ class Zend_Controller_Front
             $this->_plugins->dispatchLoopShutdown();
         } catch (Exception $e) {
             if ($this->throwExceptions()) {
-                require_once 'Zend/Controller/Exception.php';
-                throw new Zend_Controller_Exception($e->getMessage(), $e->getCode(), $e);
+                throw $e;
             }
 
             $this->_response->setException($e);