Propagate cause in OperationFailedException 18/95418/2
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 7 Mar 2021 06:39:03 +0000 (07:39 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 8 Mar 2021 09:48:47 +0000 (09:48 +0000)
We are ignoring cause here and squash it to null, fix that.

Change-Id: I01d5144b3319485107579ddc67556e469e2154c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/OperationFailedException.java

index dc4705326447cbb49b66409c47e424f8323ccfa0..289901397fff396ff0511f48ffd3adc771982747 100644 (file)
@@ -96,7 +96,7 @@ public class OperationFailedException extends Exception {
      * @param errors {@link RpcError} instances that provide additional error information about this exception
      */
     public OperationFailedException(final String message, final Throwable cause, final RpcError... errors) {
-        this(message, null, Arrays.asList(errors));
+        this(message, cause, Arrays.asList(errors));
     }
 
     /**