/**
  * Display an error message
  *
  * @access	public
  * @param	string	the error message
  * @param	string	any "swap" values
  * @param	boolean	whether to localize the message
  * @return	string	sends the application/error_db.php template		
  */
 function display_error($error = '', $swap = '', $native = FALSE)
 {
     $LANG = new CI_Language();
     $LANG->load('db');
     $heading = 'MySQL Error';
     if ($native == TRUE) {
         $message = $error;
     } else {
         $message = !is_array($error) ? array(str_replace('%s', $swap, $LANG->line($error))) : $error;
     }
     if (!class_exists('CI_Exceptions')) {
         include BASEPATH . 'libraries/Exceptions' . EXT;
     }
     $error = new CI_Exceptions();
     echo $error->show_error('An Error Was Encountered', $message, 'error_db');
     exit;
 }