Welcome Guest, Not a member yet? Register   Sign In
Error Handling and exit function
#1

[eluser]nasu[/eluser]
hello,
I see in the "core" for the "error handler" and I could not confirm that the "show_error" call the "exit" at the end of : show_error('message' [, int $ status_code = 500]).

Concerning the functions "show_error()" and "show_error_php()" they end this :
Code:
ob_start();
include(APPPATH.'errors/'.$template.EXT);
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;

Could you please confirm that an function exit is call and therefore the following code will not run ? Or should I add function exit after all call ?

Thank you.
#2

[eluser]InsiteFX[/eluser]
To exit you would need to call exit after the show_error.

InsiteFX
#3

[eluser]Dan Storm[/eluser]
If you look in system/core/Common.php at line 286 you will find the actual function which is called, when the method show_error in Exceptions.php is called. At line 290 i Common.php you will also notice that exit; is called.
#4

[eluser]nasu[/eluser]
thank you very much Repox, this will save me add one additional exit; unnecessarily.




Theme © iAndrew 2016 - Forum software by © MyBB