zend framework: custom view helper
I am trying to create a custom view helper that basically pass an array to my template via $this->partials. 
My code of custom view helper Dropdown.php placed at /libray/My/View/Helper/ folder

    class My_View_Helper_Dropdown extends Zend_View_Helper_Abstract
    {
        protected $render = true;
    
        protected $html;
    
        public function Dropdown($render = null)
        {
            if (!is_null($render))
            {
                $this->render = $render ? true : false;
            }
            
    		return $this;
        }
    
        protected function renderDropdown()
        {
        	$countries = array("US"=>"United States of America","UK"=>"United Kingdom","AUS"=>"Australia");
        	
    		if ($this->render){            
                $this->html = $this->view->partial('dropdown.phtml', null, $countries);
            }else{
                $this->html = '';
            }
        }
        /**
         * String representation of sidebar
         *
         * @return string
         */
        public function __toString()
        {
            $this->renderDropdown();
            return $this->html;
        }
    }
My Code of template dropdown.phtml placed at /views/scripts folder

    <?php if (isset($this->countries) && count($this->countries)>0): ?>
    <select name="country_id" id="country_id">
        <?php foreach ($this->countries as $c): ?>
            <option value="<?php echo $c->id;?>"><?php echo $c->name;?></option>
        <?php endforeach; ?>
    </select>>
    <?php endif; ?>
My code of Layout "Front.phtml"

    <!--page start here-->
    <div id="wraper">
    	<!--header start here-->
    	<div id="header">
    		<!--nav start-->
    		<div id="topNavContent"><?php echo $this->render('cheader.phtml'); ?></div>
    		<!--nav end-->		
    		<div class="clr"></div>
    		<div><?php echo $this->render('breadcrumbs.phtml'); ?></div>
    		<div>
    		<?php 		
    		if(Zend_Controller_Front::getInstance()->getRequest()->getModuleName()=='user'){
    			echo $this->dropdown(); 
    		}
    		?>
    		</div>
    	</div>
    	<!--header end here-->
    	
    	<!--middle content start here-->
    	<div id="middle">
    		<div id="middleWrap">
    			<?php echo $this->layout()->content ?>			
    		</div>	
    	</div>
    	<!--middle content end here-->
    	
    	<!--footer start here-->
    	<div id="footer">
    		<div id="footerContent">			
    			<div class="clr"></div>	
    			<?php echo $this->render('footer.phtml'); ?>
    		</div>
    	</div>
    	<!--footer end here-->
    </div>
I have put condition in the above layout that if the module name "user" is coming in the query string then calling my view helper to display dropdown of countries. Basically i want to use that template "dropdown.phtml" across various modules. But i am getting an error

    Fatal error: Method My_View_Helper_Dropdown::__toString() must not throw an exception in C:\wamp\www\zendproject\application\layouts\front.phtml

Any help will be appreciated.
zend framework: custom view helper
===

I am trying to create a custom view helper that basically pass an array to my template via $this->partials. 
My code of custom view helper Dropdown.php placed at /libray/My/View/Helper/ folder

    class My_View_Helper_Dropdown extends Zend_View_Helper_Abstract
    {
        protected $render = true;
    
        protected $html;
    
        public function Dropdown($render = null)
        {
            if (!is_null($render))
            {
                $this->render = $render ? true : false;
            }
            
    		return $this;
        }
    
        protected function renderDropdown()
        {
        	$countries = array("US"=>"United States of America","UK"=>"United Kingdom","AUS"=>"Australia");
        	
    		if ($this->render){            
                $this->html = $this->view->partial('dropdown.phtml', null, $countries);
            }else{
                $this->html = '';
            }
        }
        /**
         * String representation of sidebar
         *
         * @return string
         */
        public function __toString()
        {
            $this->renderDropdown();
            return $this->html;
        }
    }
My Code of template dropdown.phtml placed at /views/scripts folder

    <?php if (isset($this->countries) && count($this->countries)>0): ?>
    <select name="country_id" id="country_id">
        <?php foreach ($this->countries as $c): ?>
            <option value="<?php echo $c->id;?>"><?php echo $c->name;?></option>
        <?php endforeach; ?>
    </select>>
    <?php endif; ?>
My code of Layout "Front.phtml"

    <!--page start here-->
    <div id="wraper">
    	<!--header start here-->
    	<div id="header">
    		<!--nav start-->
    		<div id="topNavContent"><?php echo $this->render('cheader.phtml'); ?></div>
    		<!--nav end-->		
    		<div class="clr"></div>
    		<div><?php echo $this->render('breadcrumbs.phtml'); ?></div>
    		<div>
    		<?php 		
    		if(Zend_Controller_Front::getInstance()->getRequest()->getModuleName()=='user'){
    			echo $this->dropdown(); 
    		}
    		?>
    		</div>
    	</div>
    	<!--header end here-->
    	
    	<!--middle content start here-->
    	<div id="middle">
    		<div id="middleWrap">
    			<?php echo $this->layout()->content ?>			
    		</div>	
    	</div>
    	<!--middle content end here-->
    	
    	<!--footer start here-->
    	<div id="footer">
    		<div id="footerContent">			
    			<div class="clr"></div>	
    			<?php echo $this->render('footer.phtml'); ?>
    		</div>
    	</div>
    	<!--footer end here-->
    </div>
I have put condition in the above layout that if the module name "user" is coming in the query string then calling my view helper to display dropdown of countries. Basically i want to use that template "dropdown.phtml" across various modules. But i am getting an error

    Fatal error: Method My_View_Helper_Dropdown::__toString() must not throw an exception in C:\wamp\www\zendproject\application\layouts\front.phtml

Any help will be appreciated.