jpountz commented on code in PR #12516: URL: https://github.com/apache/lucene/pull/12516#discussion_r1315641242
########## lucene/core/src/java/org/apache/lucene/search/TaskExecutor.java: ########## @@ -57,6 +58,12 @@ final <T> List<T> invokeAll(Collection<RunnableFuture<T>> tasks) { } catch (InterruptedException e) { throw new ThreadInterruptedException(e); } catch (ExecutionException e) { + if (e.getCause() instanceof IOException ioException) { + throw ioException; + } + if (e.getCause() instanceof RuntimeException runtimeException) { + throw runtimeException; + } throw new RuntimeException(e.getCause()); Review Comment: Maybe reuse `IOUtils#rethrowAlways` here? `throw IOUtils.rethrowAlways(e.getCause());` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org