-- Terre Porter <[email protected]> wrote
(on Friday, 03 June 2011, 03:07 PM -0400):
> I would like to use something like this :
> 
>  
> 
>                                                                 $helper =
> $this->view->getHelper($helpername);
> 
>  
> 
> But I would like to confirm the helper exists. So I've tried the above but
> since the getHelper only seems to toss an error instead of returning null or
> something I added in this.
> 
>  
> 
>                                                  try {
> 
>                                                                 $helper =
> $this->view->getHelper('inoexists');
> 
>                                                 } catch
> (Zend_Loader_PluginLoader_Exception $e) {
> 
>                                                                 // do
> something here about the error    
> 
>                                                 }
> 
> But I still get the error:
> 
>  
> 
> Zend_Loader_PluginLoader_Exception: Plugin by name 'Inoexists' was not found
> in the registry; used paths: Zend_View_Helper_:
> Zend/View/Helper/:./views/helpers/:/home/cmsdev/application/library/Core/Hel
> pers/:/home/cmsdev/application/modules/default/views/helpers/ in
> /home/cmsdev/includes/Zend/Loader/PluginLoader.php on line 412


Um, it works for me?

Do you by any chance have an exception handler registered in your
application? That may be intercepting it pre-catch.


> Anyone know why it is not being caught by the try block? Or a
> suggestion on how to fix it.

-- 
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]


Reply via email to