Welcome Guest, Not a member yet? Register   Sign In
How to load a view for the error page?
#9

[eluser]Pascal Kriete[/eluser]
Sure thing.

Whenever CI encounters an error it calls the proper function in the Exceptions class. I overrode those functions (db errors aren't in there, but could be) so that they now set a session variable and then redirect to the same page.

So basically we've set a session variable and refreshed (url stays the same).

The router extension checks for the session variable (hence the native sessions, CI sessions don't work that early on in the processing), and if the variable is set it loads the error controller, regardless of the url. If it isn't set, it just routes them normally.

Let me know if that clears things up.


Messages In This Thread
How to load a view for the error page? - by El Forum - 06-07-2008, 08:57 PM
How to load a view for the error page? - by El Forum - 06-08-2008, 04:07 AM
How to load a view for the error page? - by El Forum - 06-08-2008, 07:04 AM
How to load a view for the error page? - by El Forum - 06-08-2008, 07:43 AM
How to load a view for the error page? - by El Forum - 06-08-2008, 11:28 AM
How to load a view for the error page? - by El Forum - 06-08-2008, 12:18 PM
How to load a view for the error page? - by El Forum - 06-08-2008, 12:21 PM
How to load a view for the error page? - by El Forum - 07-19-2008, 12:32 PM
How to load a view for the error page? - by El Forum - 07-19-2008, 01:48 PM
How to load a view for the error page? - by El Forum - 07-19-2008, 03:04 PM
How to load a view for the error page? - by El Forum - 07-19-2008, 03:25 PM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:16 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:23 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:28 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:30 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:31 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:33 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:42 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:44 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 10:58 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 11:09 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 11:12 AM
How to load a view for the error page? - by El Forum - 07-20-2008, 12:21 PM
How to load a view for the error page? - by El Forum - 07-20-2008, 01:11 PM
How to load a view for the error page? - by El Forum - 07-20-2008, 01:15 PM
How to load a view for the error page? - by El Forum - 07-20-2008, 05:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB