Yes, nobody want errors to happen in their code, however when they happen, you must be able to retrieve full information about them no matter which language or framework you use. I came across this issue while developing a site with codeigniter. I looked through the user guide but was not able to find it. However after searching through the web I came across some forum posts answering my concerns. Although I missed the url, Here is the name of the function using which you can retrieve the info about the errors.
- $this->db->_error_message()
- Returns the error message from the database depending upon the database driver being used. For MySql, it uses mysql_error()
- $this->db->_error_number()
- Returns the error number from the database depending upon the database driver being used. For MySql, it uses mysql_errno()
I didn't find it documented anywhere so I am posting here. Let me know if anyone have references to it in the user guide.