Error Handling: what to do? |
[eluser]koichirose[/eluser]
Hi, I'd like all errors (404, db, general errors) to be handled by my views, so my header, my content with the error message (maybe personalized) and a footer, for example, instead of those ugly white pages. How can it be done? Thanks
[eluser]HdotNET[/eluser]
you have error templates to play with as per the manual... application/errors/error_general.php application/errors/error_404.php http://ellislab.com/codeigniter/user-gui...rrors.html
[eluser]koichirose[/eluser]
Yeah, but I can't load views from those files, I'd have to put in static html code...am I wrong?
[eluser]HdotNET[/eluser]
good point. similar stuff being discussed here: http://ellislab.com/forums/viewthread/109430/
[eluser]Dam1an[/eluser]
You could call the CI super object using get_instance()... although that would break the whole MVC a bit as you're technically in a view You could always extend the exception class (I'm about to look into this myselt) |
Welcome Guest, Not a member yet? Register Sign In |