Would adding an exception to the Response work though?

2008/11/4 Matthew Weier O'Phinney <[EMAIL PROTECTED]>:
> -- Waigani <[EMAIL PROTECTED]> wrote
> (on Monday, 03 November 2008, 09:59 PM -0800):
>> Is it possible? I want to throw an exception in the preDispatch of a plugin
>> if you are not allowed to view the page. I then want to handle that
>> exception via the errorController. I can wrap the $front->dispatch() in a
>> try / catch and catch the exception in the bootstrap, but then how do I
>> forward that onto the errorController, as the front controller has not been
>> dispatched? I've read the manual and other posts and have not found an
>> answer nor an alternative method.
>
> Currently, throwing exceptions in plugins is unhandled, and you must
> handle them manually, as you are attempting to do.
>
> Probably the easiest way to re-dispatch in this case is to simply set an
> error message in the session, and then redirect to an error page where
> you display that message.
>
> We *have* noted this issue for a future Zend_Controller improvement.
>
> --
> Matthew Weier O'Phinney
> Software Architect       | [EMAIL PROTECTED]
> Zend Framework           | http://framework.zend.com/
>



-- 
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------

Reply via email to