Welcome Guest, Not a member yet? Register   Sign In
How exception class is working ?
#1

[eluser]Anurag[/eluser]
Hi,

I want to know that how Exception class is working automatically when an exceptions occurs.Actually we are not using try ,catch syntax on our coding so how exception been handled by Exception class.
Please guide by if any one have idea or knowledge about framework.

Below mention is sequence of loading files in codeigniter

1) Config Class Initialized
2) Hooks Class Initialized
3) URI Class Initialized
4) Router Class Initialized
5) Output Class Initialized
6) Input Class Initialized
7) Global POST and COOKIE data sanitized
8) Language Class Initialized
9) Loader Class Initialized
10) Controller Class Initialized

But i am unable to catch Exception class loading stage.Please help me out to understand working patten of codeigniter.

Thanks
#2

[eluser]Bart Mebane[/eluser]
Codeigniter.php calls
Code:
set_error_handler('_exception_handler');
set_error_handler is an internal php function. The _exception_handler function (located in Common.php) loads the Exceptions class. Thus the Exceptions class is only loaded when an error occurs.
#3

[eluser]Anurag[/eluser]
:-) Thanks for your valuable post.
#4

[eluser]Anurag[/eluser]
I think sequence of loading files in codeigniter is like this

1) index.php
2) Codeigniter.php
3) Common.php
4) Compat.php
5) constants.php
6) Config Class Initialized
7) Hooks Class Initialized
8) URI Class Initialized
9) Router Class Initialized
10) Output Class Initialized
11) Input Class Initialized
12) Global POST and COOKIE data sanitized
13) Language Class Initialized
14) Loader Class Initialized
15) Controller Class Initialized

Is I am right ...........
#5

[eluser]InsiteFX[/eluser]
You can also extend the CodeIgniter Exceptions Class.

InsiteFX
#6

[eluser]Anurag[/eluser]
Thanks, I already created that............




Theme © iAndrew 2016 - Forum software by © MyBB