Skip to content
Permalink
Browse files
JIRA-1138
closes #37
  • Loading branch information
Maja Kabiljo committed May 10, 2017
1 parent d4596a0 commit 67540b32bea000574561485e11f7f033be1dc2cd
Showing 1 changed file with 10 additions and 2 deletions.
@@ -270,8 +270,16 @@ public static <R> List<R> getResultsWithNCallables(
// 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;

0 comments on commit 67540b3

Please sign in to comment.