giraph-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: updated refs/heads/trunk to 67540b3
Date Wed, 10 May 2017 16:45:31 GMT
Repository: giraph
Updated Branches:
  refs/heads/trunk d4596a029 -> 67540b32b


JIRA-1138

closes #37


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

Branch: refs/heads/trunk
Commit: 67540b32bea000574561485e11f7f033be1dc2cd
Parents: d4596a0
Author: Maja Kabiljo <majakabiljo@fb.com>
Authored: Wed May 10 09:45:14 2017 -0700
Committer: Maja Kabiljo <majakabiljo@fb.com>
Committed: Wed May 10 09:45:14 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/giraph/utils/ProgressableUtils.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/67540b32/giraph-core/src/main/java/org/apache/giraph/utils/ProgressableUtils.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/utils/ProgressableUtils.java b/giraph-core/src/main/java/org/apache/giraph/utils/ProgressableUtils.java
index 88bb944..d4dfb8e 100644
--- a/giraph-core/src/main/java/org/apache/giraph/utils/ProgressableUtils.java
+++ b/giraph-core/src/main/java/org/apache/giraph/utils/ProgressableUtils.java
@@ -270,8 +270,16 @@ public class ProgressableUtils {
           // Try to get result from the future
           result = entry.getValue().get(
               MSEC_TO_WAIT_ON_EACH_FUTURE, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException | ExecutionException e) {
-          throw new IllegalStateException("Exception occurred", e);
+        } catch (InterruptedException e) {
+          throw new IllegalStateException("Interrupted", e);
+        } catch (ExecutionException e) {
+          // Execution exception wraps the actual cause
+          if (e.getCause() instanceof RuntimeException) {
+            throw (RuntimeException) e.getCause();
+          } else {
+            throw new IllegalStateException("Exception occurred", e.getCause());
+          }
+
         } catch (TimeoutException e) {
           // If result is not ready yet just keep waiting
           continue;


Mime
View raw message