From 58f9aaccb005d0a4aca630a379995c6d7b63cd72 Mon Sep 17 00:00:00 2001 From: "Daniel Doubrovkine (dB.)" Date: Mon, 10 May 2021 15:21:33 -0400 Subject: [PATCH] Catch runtime exceptions to make class loader race conditions easier to debug. (#608) Signed-off-by: dblock --- server/src/main/java/org/opensearch/LegacyESVersion.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/main/java/org/opensearch/LegacyESVersion.java b/server/src/main/java/org/opensearch/LegacyESVersion.java index c20700879f932..0157b76866cb1 100644 --- a/server/src/main/java/org/opensearch/LegacyESVersion.java +++ b/server/src/main/java/org/opensearch/LegacyESVersion.java @@ -183,6 +183,8 @@ public class LegacyESVersion extends Version { "expected [" + version.id + "] to be uniquely mapped but saw [" + maybePrevious + "] and [" + version + "]"; } catch (final IllegalAccessException e) { assert false : "Version field [" + fieldName + "] should be public"; + } catch (final RuntimeException e) { + assert false : "Version field [" + fieldName + "] threw [" + e + "] during initialization"; } } }