[Solar-talk] Handling 404 and exceptions

Leo Chiao leo.chiao at gmail.com
Sat Mar 1 07:53:24 CST 2008


Sorry for such a basic question, but I wanted to know what is the
recommended way of handling 404 errors and exceptions in Solar.  From what I
can tell, specifying the default controller through the config makes that
controller be displayed in 404 scenarios where a controller isn't found.
This config setup appears to work for what I want to do, but I'm not sure if
it's the best or proper way:

$config['Solar_Controller_Front']['default'] = 'error';
$config['Solar_Controller_Front']['routing'] = array(
        '' => 'Vendor_App_News',
'error' => 'Vendor_App_Error'
);


Using this config, accessing the project by it's base url would load the
news controller, whereas the error controller would load for non-existent
controllers.  Is this the right way to accomplish what I am trying to do?

On a related note to handling 404s, what is the recommended way to capture
all exceptions and display a generic error message page?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080301/bbb83e0c/attachment.html


More information about the Solar-talk mailing list