Skip to content

Commit

Permalink
Merge pull request #31 from transcom/b-21326-log-improvement-2
Browse files Browse the repository at this point in the history
additional try catch
  • Loading branch information
cameroncaci authored Oct 15, 2024
2 parents 12e8262 + 009bf56 commit df4cc5c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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.19</version>
<version>1.0.3.20</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 @@ -92,7 +92,7 @@ public List<LineOfAccounting> parse(byte[] fileContent, XMLGregorianCalendar trd
logger.info("failed to parse TGET LOA data row: " + row);
}
} catch (RuntimeException e) {
logger.error("Error processing row " + row + ": " + e.getMessage(), e);
logger.error("Error processing TGET LOA data row " + row + ": " + e.getMessage(), e);
}

row++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ public List<TransportationAccountingCode> parse(byte[] fileContent, XMLGregorian
break;
}
String[] values = line.split("\\|");
TransportationAccountingCode code = processLineIntoTAC(values, columnNamesAndLocations, trdmLastUpdate);
try {
TransportationAccountingCode code = processLineIntoTAC(values, columnNamesAndLocations, trdmLastUpdate);

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

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

0 comments on commit df4cc5c

Please sign in to comment.