Answer the question
In order to leave comments, you need to log in
How to catch/handle database errors in PHP CodeIgnater 3?
CI has a method that returns the request error code, $this->db->error(); but only the last request, and many requests are executed during the application, and if the error was not given by the last one, then the hook where this method was inserted does not register errors... There is an option to embed the handler in the database error output template. But this is a crutch and will not work when called through the CLI ...
I don’t want to refract the code and add logic for processing each request. This is long, and the human error factor in the code is likely.
Tell me how to catch errors in CodeIgnater 3
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question