Zend 框架 2 中 Zend_Controller_Plugin_ErrorHandler 和 Zend_Controller_Action_Exception 的等价物是什么?我习惯于在框架的过去版本中编写 ErrorController(例如http://framework.zend.com/manual/1.12/en/zend.controller.plugins.html),但现在使用的是第二版,我不能查找有关如何编写自定义错误处理程序的任何示例。
在我的实例中,我正在编写一个 REST 服务器,并希望抛出与特定 HTTP 错误代码相对应的异常。
据我所知,看来我可能需要编写自己的 Zend\Mvc\View\Http\ExceptionStrategy 自定义版本,由 Zend\Mvc\View\Http\ViewManager 调用