Skip to content

Commit

Permalink
Merge pull request #30 from transcom/b-21326-log-improvement
Browse files Browse the repository at this point in the history
b-21327catch and log
  • Loading branch information
cameroncaci authored Oct 15, 2024
2 parents 6d0e8a3 + 87177ee commit 12e8262
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>com.milmove.trdmlambda</groupId>
<artifactId>trdm-lambda</artifactId>
<version>1.0.3.18</version>
<version>1.0.3.19</version>
<name>trdm java spring interface</name>
<description>Project for deploying a Java TRDM interfacer for TGET data.</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,19 @@ public List<LineOfAccounting> parse(byte[] fileContent, XMLGregorianCalendar trd
break;
}
String[] values = line.split("\\|");
LineOfAccounting code = processLineIntoLOA(values, columnNamesAndLocations, trdmLastUpdate);

if (code != null) {
codes.add(code);
} else {
logger.info("failed to parse TGET LOA data row: " + row);
try {
LineOfAccounting code = processLineIntoLOA(values, columnNamesAndLocations, trdmLastUpdate);

if (code != null) {
codes.add(code);
} else {
logger.info("failed to parse TGET LOA data row: " + row);
}
} catch (RuntimeException e) {
logger.error("Error processing row " + row + ": " + e.getMessage(), e);
}

row++;
}
logger.info("finished parsing every single line");
Expand Down

0 comments on commit 12e8262

Please sign in to comment.