use of org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward in project cu-kfs by CU-CommunityApps.
the class ContractsGrantsInvoiceCreateDocumentServiceImpl method writeErrorToFile.
protected void writeErrorToFile(Map<ContractsAndGrantsBillingAward, List<String>> invalidGroup, String errOutputFile) {
PrintStream outputFileStream = null;
File errOutPutfile = new File(errOutputFile);
try {
outputFileStream = new PrintStream(errOutPutfile, StandardCharsets.UTF_8);
writeReportHeader(outputFileStream);
for (ContractsAndGrantsBillingAward award : invalidGroup.keySet()) {
writeErrorEntryByAward(award, invalidGroup.get(award), outputFileStream);
}
outputFileStream.print("\r\n");
} catch (IOException ioe) {
LOG.error("Could not write errors in Contracts & Grants Invoice Document creation process to file" + ioe.getMessage());
throw new RuntimeException("Could not write errors in Contracts & Grants Invoice Document creation " + "process to file", ioe);
} finally {
if (outputFileStream != null) {
outputFileStream.close();
}
}
}
Aggregations