From 009bf56e40df466d89b39530c9e2f83b1d593381 Mon Sep 17 00:00:00 2001 From: cameroncaci Date: Tue, 15 Oct 2024 11:58:55 -0400 Subject: [PATCH] additional try catch --- pom.xml | 2 +- .../trdmlambda/milmove/util/LineOfAccountingParser.java | 2 +- .../milmove/util/TransportationAccountingCodeParser.java | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 83f3f30..a934847 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.milmove.trdmlambda trdm-lambda - 1.0.3.19 + 1.0.3.20 trdm java spring interface Project for deploying a Java TRDM interfacer for TGET data. diff --git a/src/main/java/com/milmove/trdmlambda/milmove/util/LineOfAccountingParser.java b/src/main/java/com/milmove/trdmlambda/milmove/util/LineOfAccountingParser.java index 936ddd0..4e494c3 100644 --- a/src/main/java/com/milmove/trdmlambda/milmove/util/LineOfAccountingParser.java +++ b/src/main/java/com/milmove/trdmlambda/milmove/util/LineOfAccountingParser.java @@ -92,7 +92,7 @@ public List 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++; diff --git a/src/main/java/com/milmove/trdmlambda/milmove/util/TransportationAccountingCodeParser.java b/src/main/java/com/milmove/trdmlambda/milmove/util/TransportationAccountingCodeParser.java index 2325ad9..b70ada6 100644 --- a/src/main/java/com/milmove/trdmlambda/milmove/util/TransportationAccountingCodeParser.java +++ b/src/main/java/com/milmove/trdmlambda/milmove/util/TransportationAccountingCodeParser.java @@ -77,13 +77,18 @@ public List 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");