Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-11-2007, 12:57 PM
Junior Member
 
Join Date: Jun 2007
Posts: 4
Default catch bootstrap exception

hi all

i'm using zf 1.0 production, just a query, after my site was down the other day due to mysql failing
my boostrap file looks like
PHP Code:
try {
        
$controller Zend_Controller_Front::getInstance();
        
$controller->setControllerDirectory(Global::CONTROLLER_PATH);
        
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
        
$viewRenderer->setView(new View_Html())
                     ->
setViewSuffix('php');
        
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
        
$controller->dispatch();
    }
    catch (
Exception $e) {
        
Log_File::getLogger()->log('controller fail: ' $e->getMessage(), Zend_Log::CRIT);
    } 
how can i make the controller dispatch to a 500 server error page when the exception is caught?

thanks
dave
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-18-2007, 08:17 AM
Junior Member
 
Join Date: Jul 2007
Posts: 5
Default

I'm also interested in this answer. But I'd like to redirect to 404 Error page (I'll expect, that my application will be working correctly)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-18-2007, 03:45 PM
Junior Member
 
Join Date: Jul 2007
Posts: 5
Default

This might be useful:

5. Dispatch Error Handling and 404 Error Pages - Zend Framework Development - Zend Framework Wiki
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-20-2007, 11:48 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

WebSVN - spotsecng-backup - Rev 187 - /branches/potatobob/src/webconsole/htdocs/index.php
https://spotsecng.svn.sourceforge.ne...Controller.php
__________________
Zym Framework - A Zend Framework extension library w/ demo app

SpotSec Blog:
http://spotsec.com/blog

Last edited by SpotSec : 07-21-2007 at 12:04 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:35 PM.