From 3343ceeae44f3d28e3c1ba7861886848df74e390 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 4 Jul 2016 08:41:06 -0400 Subject: Do not catch throwable Today throughout the codebase, catch throwable is used with reckless abandon. This is dangerous because the throwable could be a fatal virtual machine error resulting from an internal error in the JVM, or an out of memory error or a stack overflow error that leaves the virtual machine in an unstable and unpredictable state. This commit removes catch throwable from the codebase and removes the temptation to use it by modifying listener APIs to receive instances of Exception instead of the top-level Throwable. Relates #19231 --- .../org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src/test/java/org/elasticsearch/versioning') diff --git a/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java b/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java index b2cc794ac6..e2c572f783 100644 --- a/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java +++ b/core/src/test/java/org/elasticsearch/versioning/ConcurrentDocumentOperationIT.java @@ -53,7 +53,7 @@ public class ConcurrentDocumentOperationIT extends ESIntegTestCase { } @Override - public void onFailure(Throwable e) { + public void onFailure(Exception e) { logger.error("Unexpected exception while indexing", e); failure.set(e); latch.countDown(); -- cgit v1.2.3