CodeIgniter lets you build error reporting into your applications using the functions described below. In addition, it has an error logging class that permits error and debugging messages to be saved as text files.
showerror('message' [, int $statuscode= 500 ] )
This function will display the error message supplied to it using template application/errors/errorgeneral.php.
show404('page' [, 'logerror'])
This function will display the 404 error message supplied to it using template application/errors/error404.php.
logmessage('level', 'message')
This function lets you write messages to your log files. You must supply one of three "levels" in the first parameter, indicating what type of message it is (debug, error, info), with the message itself in the second parameter.