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

Signed-off-by: dblock <dblock@amazon.com>
This commit is contained in:
Daniel Doubrovkine (dB.) 2021-05-10 15:21:33 -04:00 committed by GitHub
parent 2581f3d450
commit 58f9aaccb0
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";
}
}
}