Cominciate disattivando l'output degli errori a schermo in application/config/database.php:
// suppress error output to the screen $db['default']['db_debug'] = FALSE; Poi, nel model o nel controller, gestite i fallimenti in modo controllato:
// try the select. $dbRet = $this->db->select($table, $dataArray); // select has had some problem. if( !$dbRet ) { $errNo = $this->db->_error_number(); $errMess = $this->db->_error_message(); // Do something with the error message or just show_404(); } Così potete leggere _error_number() e _error_message() e decidere come reagire, invece di mostrare errori grezzi ai vostri utenti.