From ca8b3ac0ba39537d65d763ceb04e210c8f9fa878 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 17 Sep 2013 17:19:50 +0200 Subject: [PATCH] Don't throw set exception if it is an error based exception, this breaks how we deal with assertions in general. --- .../elasticsearch/common/util/concurrent/BaseFuture.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java b/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java index 03ce7d3cd28..8c78eb8ab4e 100644 --- a/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java +++ b/src/main/java/org/elasticsearch/common/util/concurrent/BaseFuture.java @@ -182,9 +182,12 @@ public abstract class BaseFuture implements Future { // If it's an Error, we want to make sure it reaches the top of the // call stack, so we rethrow it. - if (throwable instanceof Error) { - throw (Error) throwable; - } + + // we want to notify the listeners we have with errors as well, as it breaks + // how we work in ES in terms of using assertions +// if (throwable instanceof Error) { +// throw (Error) throwable; +// } return result; }