Improve error message on <validate> failure 96/74796/2
authorMarek Gradzki <mgradzki@cisco.com>
Fri, 3 Aug 2018 12:28:56 +0000 (14:28 +0200)
committerMarek Gradzki <mgradzki@cisco.com>
Fri, 3 Aug 2018 18:51:15 +0000 (20:51 +0200)
Change-Id: I1af1c918c0a21645380ce3ce55c608729365f140
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
netconf/mdsal-netconf-connector/src/main/java/org/opendaylight/netconf/mdsal/connector/TransactionProvider.java

index 5baf6d7d311eafbbf005b0debbd204899ffd9cc6..7e2ecc8d9d9062417101aab1a94ddf07705a7f2a 100644 (file)
@@ -94,10 +94,10 @@ public class TransactionProvider implements AutoCloseable {
                 netconfSessionIdForReporting, e);
             final String cause = e.getCause() != null ? (" Cause: " + e.getCause().getMessage()) : "";
             throw new DocumentedException(
-                "Candidate transaction validate failed on " + e.getMessage() + " " + netconfSessionIdForReporting
-                    +  cause, e, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED, ErrorSeverity.ERROR);
+                "Candidate transaction validate failed [sessionId=" + netconfSessionIdForReporting + "]: "
+                    + e.getMessage() + cause,
+                e, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED, ErrorSeverity.ERROR);
         }
-        return;
     }
 
     public synchronized boolean commitTransaction() throws DocumentedException {