summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/action/ingest
diff options
context:
space:
mode:
authorJason Tedor <jason@tedor.me>2016-07-04 08:41:06 -0400
committerGitHub <noreply@github.com>2016-07-04 08:41:06 -0400
commit3343ceeae44f3d28e3c1ba7861886848df74e390 (patch)
tree7223f17293ef950db42bb2843d049528befcee38 /core/src/test/java/org/elasticsearch/action/ingest
parent86d2e883620ef44afb5fed7ed86854061d49f966 (diff)
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
Diffstat (limited to 'core/src/test/java/org/elasticsearch/action/ingest')
-rw-r--r--core/src/test/java/org/elasticsearch/action/ingest/BulkRequestModifierTests.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/test/java/org/elasticsearch/action/ingest/BulkRequestModifierTests.java b/core/src/test/java/org/elasticsearch/action/ingest/BulkRequestModifierTests.java
index 3286c07e06..9ee5036131 100644
--- a/core/src/test/java/org/elasticsearch/action/ingest/BulkRequestModifierTests.java
+++ b/core/src/test/java/org/elasticsearch/action/ingest/BulkRequestModifierTests.java
@@ -111,7 +111,7 @@ public class BulkRequestModifierTests extends ESTestCase {
}
@Override
- public void onFailure(Throwable e) {
+ public void onFailure(Exception e) {
}
});
@@ -157,7 +157,7 @@ public class BulkRequestModifierTests extends ESTestCase {
}
@Override
- public void onFailure(Throwable e) {
+ public void onFailure(Exception e) {
}
public BulkResponse getResponse() {