Welcome Guest, Not a member yet? Register   Sign In
Error Handling: what to do?
#1

[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
#2

[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
#3

[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?
#4

[eluser]HdotNET[/eluser]
good point.

similar stuff being discussed here:

http://ellislab.com/forums/viewthread/109430/
#5

[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)




Theme © iAndrew 2016 - Forum software by © MyBB