Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.7
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Controller
-
Labels:None
Description
Let me try to explain it with some code:
Application dispatching:
$front = Zend_Controller_Front::getInstance(); try { $front->dispatch(); } catch (My_Controller_Outcome_Result $e) { $front->getResponse()->sendResponse(); // Ignore }
My_Controller_Outcome_Result exceptions (thrown somewhere in actions) usually indicate a redirect
(or other event that should stop the execution)
Prior to 19661 I was actually getting a My_Controller_Outcome_Result
exception, but after that the instance is Zend_Controller_Exception,
so the catch fails.
I managed to locate the change in ZF rev 19661 (trunk).
Issue Links
| This issue is duplicated by: | ||||
| ZF-8763 | Zend_Controller_Dispatcher_Standard rethrows Zend_Controller_Action_Exception as Zend_Controller_Exception |
|
|
|
I really hope this gets fixed soon.
I don't know how we're supposed to try/catch our own code if the Zend Framework now only throws Zend_Controller_Exception for everything that's thrown out of the code.