Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Zend 框架Zend_Acl,当用户被拒绝访问资源时,我想抛出异常。我使用哪个异常类?
Zend_Acl
你可以使用
throw new Zend_Controller_Action_Exception('Forbidden', 403);
AFAIK,如果您要问的话,您对此没有特定的例外。创建您自己的异常类,该类继承自Zend_Exception并抛出该异常类。
Zend_Exception