function show_exception($exception) { if (!is_null($CI =& get_instance())) { $message = $exception->getMessage(); if (empty($message)) { $message = '(null)'; } $error_data['exception'] = $exception; $error_data['message'] = $message; $CI->load->helper('email'); report_error('error_exception', $error_data); } return parent::show_exception($exception); }