ZF-8558: Backward incompatible change in rev 19661

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).

Comments

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.

Resolved in trunk.

The same pattern is used in Zend_Controller_Dispatcher_Standard, line 301. Can that be fixed as well? (r19833 fixed only Zend_Controller_Front)

Opening due to user reports

Fixed in r20244 in trunk.

The same thing is happening in various places in Zend_Controller_Plugin_Broker as well. :)

Verified; will remove those wrapped exceptions shortly.

Plugin broker no longer wraps re-thrown exceptions in trunk.

Everything seems fine now. Thank you! :)