Log proper error message for UpdatePropertyTool 40/121140/1
authorNiharika Sharma <niharika.sharma@amdocs.com>
Thu, 6 May 2021 16:45:39 +0000 (12:45 -0400)
committerNiharika Sharma <niharika.sharma@amdocs.com>
Thu, 6 May 2021 16:45:39 +0000 (12:45 -0400)
Issue-ID: AAI-3328
Signed-off-by: Niharika Sharma <niharika.sharma@amdocs.com>
Change-Id: I3e38c92b6b4343ec8153219a989e241e8e9e4127

src/main/java/org/onap/aai/dbgen/UpdatePropertyToolInternal.java

index 91f62f9..a994c7b 100644 (file)
@@ -212,12 +212,12 @@ public class UpdatePropertyToolInternal {
                 logAndPrint("Unsuccessful update transaction. Rolling back graph");
             }
         } catch (Exception e) {
+            logErrorAndPrint("ERROR: Could not properly query and update vertex.", e);
             if (transaction != null) {
                 transaction.rollback();
             } else {
                 logAndPrint("ERROR: JanusGraphTransaction object is null");
             }
-            logErrorAndPrint("ERROR: Could not properly query and update vertex.", e);
             isValidTransaction = false;
         } finally {
             // close the transaction -- note: JanusGraph graph object will be closed in the main method.