Catch runtime exceptions to make class loader race conditions easier to debug. (#608) (#750)

Signed-off-by: dblock <dblock@amazon.com>

Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org>
This commit is contained in:
Abbas Hussain 2021-05-21 11:04:14 +05:30 committed by GitHub
parent 935001e16a
commit d01197f954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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";
}
}
}