CodeIgniter Forums
Custom CodeIgniter Errors - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Custom CodeIgniter Errors (/thread-32886.html)



Custom CodeIgniter Errors - El Forum - 08-08-2010

[eluser]Josh K[/eluser]
This has to be simpler. Everything else is!

How do I set up custom error handling for CI?


Custom CodeIgniter Errors - El Forum - 08-09-2010

[eluser]gyo[/eluser]
Do you mean something like the files in 'application/errors'?


Custom CodeIgniter Errors - El Forum - 08-09-2010

[eluser]John_Betong[/eluser]
UhOh may suit your requyirements:

http://dhorrigan.com/news/2010/07/uhoh


Custom CodeIgniter Errors - El Forum - 08-09-2010

[eluser]Josh K[/eluser]
[quote author="gyo / suashi" date="1281362025"]Do you mean something like the files in 'application/errors'?[/quote]

That is one option, but I would like to define a page in my views that gets hit on errors. Not (basically) the static pages there.


Custom CodeIgniter Errors - El Forum - 08-09-2010

[eluser]Josh K[/eluser]
[quote author="John_Betong" date="1281369741"]UhOh may suit your requyirements:

http://dhorrigan.com/news/2010/07/uhoh[/quote]

No, I mean 404, 500, 403, etc, errors. Not internal app errors (unless I'm mistaken and UhOh does support those).


Custom CodeIgniter Errors - El Forum - 08-09-2010

[eluser]gyo[/eluser]
You can try MY_Controller by Jamie Rumbelow.

If you create a method named '_404' in your controllers it will be executed instead of the normal error page.
At the moment it only supports the error 404, but it shouldn't be too hard to implement more.


Custom CodeIgniter Errors - El Forum - 08-09-2010

[eluser]Josh K[/eluser]
[quote author="gyo / suashi" date="1281378327"]You can try MY_Controller by Jamie Rumbelow.

If you create a method named '_404' in your controllers it will be executed instead of the normal error page.
At the moment it only supports the error 404, but it shouldn't be too hard to implement more.[/quote]

I took a look at that but seem to have trouble dropping it in as a replacement. Particularly it seemed to be unable to load '[controller]/index.php'. Perhaps I had best take a better look at the CI Core.