-- David Muir <[email protected]> wrote (on Friday, 05 October 2012, 12:02 PM +1000): > On 05/10/12 11:34, David Muir wrote: > > In my config I have: > > > > ... > > 'view_manager' => array( > > 'display_not_found_reason' => true, > > 'display_exceptions' => true, > > ... > > > > But when the application throws and exception, I get a blank page. > > Shouldn't the exception be caught an then displayed? > > > > Cheers, > > David > > Ah, now I get it. Exceptions thrown by a controller (or anything further > down the stack) are caught and displayed. But exceptions thrown in the > higher up MVC layers are not caught. Is this intentional? > > Eg, if my Module.php onBootstrap() throws an exception, then it results > in a fatal uncaught exception.
We're planning a way to catch exceptions during the render() event currently, which addresses one pain point. We likely can also catch exceptions during bootstrap; this is the first report I've seen where that could be useful. Could you file a feature request on the issue tracker, please (note: moved to https://github.com/zendframework/zf2/issues). The other place it might be useful is during module loading. However, that becomes problematic, as the application is not yet fully configured. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
