ZF-8763: Zend_Controller_Dispatcher_Standard rethrows Zend_Controller_Action_Exception as Zend_Controller_Exception

Issue Type: Bug Created: 2010-01-09T17:12:22.000+0000 Last Updated: 2010-01-12T13:15:13.000+0000 Status: Resolved Fix version(s): Reporter: Tomasz Sterna (smoku) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: - ZF-8558



Zend_Controller_Dispatcher_Standard::dispatch() in try { $controller->dispatch($action); } catch (Exception $e) { catches Zend_Controller_Action_Exception thrown from controller on missing action method and rethrows it wrapped in Zend_Controller_Action_Exception.

On the other hand Zend_Controller_Plugin_ErrorHandler::postDispatch() checks for Zend_Controller_Action_Exception to set $error->type = self::EXCEPTION_NO_ACTION; which is then used by custom ErrorControler to determine what to do with an error. Without type set as EXCEPTION_NO_ACTION it does not handle missing action as a missing "page".

I think Zend_Controller_Dispatcher_Standard::dispatch() should just "throw $e" instead of "hrow new Zend_Controller_Exception(....)".


Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-01-09T17:17:20.000+0000

Please check if it still occurs on trunk. I ink it was fixed there already.

Posted by Tomasz Sterna (smoku) on 2010-01-09T17:32:13.000+0000

The version I'm reporting this bug against is:

$ LANG=POSIX svn info library/Zend/Controller/Dispatcher/Standard.php Path: library/Zend/Controller/Dispatcher/Standard.php Name: Standard.php URL:… Repository Root: Repository UUID: 44c647ce-9c0f-0410-b52a-842ac1e357ba Revision: 20167 Node Kind: file Schedule: normal Last Changed Author: bkarwin Last Changed Rev: 20096 Last Changed Date: 2010-01-06 03:05:09 +0100 (Wed, 06 Jan 2010) Text Last Updated: 2010-01-09 22:54:38 +0100 (Sat, 09 Jan 2010) Checksum: 8d4d3d09592cf9ec87ef8a7bf02587d1

It's a latest one as of this writing.

Posted by Matthew Weier O'Phinney (matthew) on 2010-01-12T13:15:13.000+0000

Fixed in r20244 in trunk

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.