Various locations in the code base currently catch all exceptions and throw RuntimeException, e.g.
|
} catch (Exception e) { |
|
throw new RuntimeException(e.getMessage()); |
@imotov weighed in on this issue:
I think, for now, this can be replaced with Utils.handleThrowable. More generally, though, I don't think this is a great pattern. We shouldn't indiscriminately wrap everything in a RuntimeException, as that prevents applications using this library from handling serious conditions such as OutOfMemoryError or AssertionError appropriately. In general, it's better to propagate Error subclasses unchanged and only wrap exceptions that are actually intended to be converted into unchecked exceptions.
Various locations in the code base currently catch all exceptions and throw
RuntimeException, e.g.cuvs-lucene/src/main/java/com/nvidia/cuvs/lucene/Lucene99AcceleratedHNSWVectorsFormat.java
Lines 93 to 94 in 4db50a1
@imotov weighed in on this issue: