I have a CodeIgniter application that\'s generally working how I\'d like it to, but occasionally a user will go to a page that does not exist and is greeted with an unfriendly e
Try these codeigniter functions
show_404('Your error message'); show_error('Your error message');
you can find more detail at http://codeigniter.com/user_guide/general/errors.html
example:
if ($some_error) //condition { show_error('Error'); }