Welcome Guest, Not a member yet? Register   Sign In
Extending CodeIgniter’s Exceptions Class
#5

[eluser]Jelmer[/eluser]
I'm still very much figuring that out myself, I'm trying to let all errors be shown using the user-chosen site template - but that's giving me other errors as I use config vars within those views.

The way I'm solving it now:
- Test whether CI has been loaded
Code:
if (class_exists('CI_Base'))
- When CI has been loaded use the CI superobject functions
- When CI hasn't been loaded use the default functions

It's far from perfect, but it's pretty much the best way I can think without doing a lot of work for something that happens very little.

Edit, just a bit more info: when the CI superobject has been loaded and the DB has been succesfully initiated I assume CI itself is working correctly and I redirect to a controller that shows an error. When CI hasn't been loaded I assume the fault is within CI and I show the error in the CI way.


Messages In This Thread
Extending CodeIgniter’s Exceptions Class - by El Forum - 02-17-2010, 09:27 AM
Extending CodeIgniter’s Exceptions Class - by El Forum - 04-14-2010, 05:46 AM
Extending CodeIgniter’s Exceptions Class - by El Forum - 04-14-2010, 07:41 AM
Extending CodeIgniter’s Exceptions Class - by El Forum - 04-14-2010, 07:46 AM
Extending CodeIgniter’s Exceptions Class - by El Forum - 04-14-2010, 08:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB