/* Fill in columns if we got an error reading the packet. We set most columns to "???", fill in columns that don't need data read from the file, and set the Info column to an error message.  */
void col_fill_in_error(column_info *cinfo, frame_data *fdata, const gboolean fill_col_exprs, const gboolean fill_fd_colums)
/* Fill in columns if we got an error reading the packet. We set most columns to "???", fill in columns that don't need data read from the file, and set the Info column to an error message.  */
void col_fill_in_error(column_info *cinfo, frame_data *fdata, const gboolean fill_col_exprs, const gboolean fill_fd_colums)
{
  int i;
  col_item_t* col_item;
  if (!cinfo)
    return;
  for (i = 0; i < cinfo->num_cols; i++) {
    col_item = &cinfo->columns[i];
    if (col_based_on_frame_data(cinfo, i)) {
      if (fill_fd_colums)
        col_fill_in_frame_data(fdata, cinfo, i, fill_col_exprs);
    } else if (col_item->col_fmt == COL_INFO) {
      col_item->col_data = "Read error";
    } else {
      if (col_item->col_fmt >= NUM_COL_FMTS) {
        g_assert_not_reached();
      }
      col_item->col_data = "???";
      break;
    }
  }
}