Welcome Guest, Not a member yet? Register   Sign In
bug with 'log_message' ?
#1

Hello,
I noticed 'log_message' may not display error if placed after 'show_error'.
explanation
Code:
 show_error($error_message);
 log_message('error', $error_message);
don't work: no error displayed in logs

But...

Code:
 log_message('error', $error_message);
 show_error($error_message);
work perfectly: logs display the error message.

Is this normal ?
Thank you for your answers

note: show_error runs in 2 cases
Reply
#2

Yes, this is normal. If you look at the show_error() method, you'd see it ends with an exit(), stopping execution.

I just checked out the docs and they could be a little more explicit about that fact, though.

Just remember that show_error and show_404 will both stop script execution.
Reply
#3

(05-15-2016, 07:31 PM)kilishan Wrote: Yes, this is normal. If you look at the show_error() method, you'd see it ends with an exit(), stopping execution.

I just checked out the docs and they could be a little more explicit about that fact, though.

Just remember that show_error and show_404 will both stop script execution.

Thank you for your reply
Bernard
Reply




Theme © iAndrew 2016 - Forum software by © MyBB