Catch DB error |
@Diederik: the column name was just an example. I want to catch any DB error, for instance it could be losing the connexion, the table being dropped etc
@joespostiga: I've tried using the try/catch to get the exception ... but it the exception is not caught (probably none are thrown). A few more details : The model PHP Code: class P_model extends CI_Model{ Extract of the controler : PHP Code: if (($handle = fopen('./Files/P.csv', 'r')) !== FALSE) { Note that neither the $myDBerror nor the try/catch trap the error ! As a matter of fact, the debug log ($this->firephp->log) is not run when an error is generated (hence $myDBerror is completely useless). Any ideas ? Cheers, L@u |
Messages In This Thread |
Catch DB error - by ComputingFroggy - 01-21-2016, 06:15 PM
RE: Catch DB error - by Diederik - 01-22-2016, 01:33 AM
RE: Catch DB error - by josepostiga - 01-22-2016, 02:40 AM
RE: Catch DB error - by ComputingFroggy - 01-22-2016, 05:40 AM
RE: Catch DB error - by josepostiga - 01-22-2016, 05:49 AM
RE: Catch DB error - by ComputingFroggy - 01-22-2016, 06:41 AM
RE: Catch DB error - by ComputingFroggy - 01-22-2016, 08:18 AM
RE: Catch DB error - by Shawn - 01-27-2016, 06:41 PM
|