-- Jason Webster <[EMAIL PROTECTED]> wrote
(on Tuesday, 04 November 2008, 08:26 AM -0800):
> Huh? I really don't understand. Matthew, could you please elaborate?
>
> The preDispatch method of the Plugin Broker has a try/catch block that  
> should grab anything, and send it to the request object? no?

Oh, never mind. I forgot that Ralph added that for 1.6.

The problem now is one of making sure that on preDispatch(), we forward
to the ErrorController if an exception is present in the response. Can
you open an issue for that, please?


> Matthew Weier O'Phinney wrote:
>> -- 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/

Reply via email to