def generate_file_report(self, file, file_type, warning=False, ignore_error=False):
    self.setup_csv_record_validation(file, file_type)
    if ignore_error:
        try:
            self.validator.validate_job(self.val_job.job_id)
        except Exception:
            pass
    else:
        self.validator.validate_job(self.val_job.job_id)
    report_path = self.get_report_path(file_type, warning=warning)
    report_content = self.get_report_content(report_path, cross_file=False)
    return report_content
def generate_file_report(self, file, file_type, warning=False, ignore_error=False):
    self.setup_csv_record_validation(file, file_type)
    if ignore_error:
        try:
            self.validator.validate_job(self.val_job.job_id)
        except Exception:
            pass
    else:
        self.validator.validate_job(self.val_job.job_id)
    report_path = self.get_report_path(file_type, warning=warning)
    report_content = self.get_report_content(report_path, cross_file=False)
    return report_content