Update 2011/05/22: I take back my words. db->query() calls return FALSE on failure, and the error messages can be accessed via the "private" methods _error_message() (CI doesn't have language-enforced private methods; they are only indicated as such by naming convention and @access doc.).
For a recent ...