Write sql query and error before die() when $this->halt_on_errors==true
Closed this issue · 2 comments
Hello,
When execution is to be stopped on _log() function (line 4628) when $this->halt_on_errors==true
and it's a fatal error, nothing is written to log file.
// if the saved debug info is about a fatal error
// and execution is to be stopped on fatal errors
if ($fatal && $this->halt_on_errors) die();
It will be a big help to have information about the error like sql query and error message. I'm not sure if something is showed on debug console, because my project is using ajax and i have to enable log file instead of console.
$debug=[true, false, true]
Thanks
PS: If I put halt_on_errors
to false, neither the error nor the test are shown.
This should now work as logging is now done via PHP's register_shutdown_function
I have found the problem.
When only using a log file, unsuccessful-queries
are not writed to this file by _write_log()
method.
Then, after one error I can't see what sql query was the cause of error. And I do not have any way of seeing in the log those sql sentences that have failed