ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [62/62] [abbrv] ignite git commit: IGNITE-5239 Add support for suppressed exceptions.
Date Mon, 12 Jun 2017 15:34:16 GMT
IGNITE-5239 Add support for suppressed exceptions.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e981437b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e981437b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e981437b

Branch: refs/heads/ignite-5239
Commit: e981437b07dd280f727bec8bb4fa2a3940010169
Parents: 5384f73
Author: Alexey Kuznetsov <akuznetsov@gridgain.com>
Authored: Mon Jun 12 22:31:34 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@gridgain.com>
Committed: Mon Jun 12 22:31:34 2017 +0700

----------------------------------------------------------------------
 .../internal/visor/util/VisorExceptionWrapper.java       | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e981437b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
index c47c3c9..ed2cf37 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorExceptionWrapper.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.visor.util;
 
+import org.apache.ignite.internal.util.typedef.F;
+
 /**
  * Exception wrapper for safe for transferring to Visor.
  */
@@ -53,6 +55,13 @@ public class VisorExceptionWrapper extends Throwable {
 
         if (cause.getCause() != null)
             initCause(new VisorExceptionWrapper(cause.getCause()));
+
+        Throwable[] suppressed = cause.getSuppressed();
+
+        if (F.isEmpty(suppressed)) {
+            for (Throwable sup : suppressed)
+                addSuppressed(new VisorExceptionWrapper(sup));
+        }
     }
 
     /**
@@ -78,4 +87,4 @@ public class VisorExceptionWrapper extends Throwable {
     @Override public String toString() {
         return (detailMsg != null) ? (clsName + ": " + detailMsg) : clsName;
     }
-}
\ No newline at end of file
+}


Mime
View raw message