thecoop commented on PR #14995: URL: https://github.com/apache/lucene/pull/14995#issuecomment-3195630140
The difference is in the method signature. `closeWhileHandlingExceptions` is the old method, which swallows all non-Error exceptions and re-throws Errors (hence the `useOrSuppress`, in case there is an Error thrown that other exceptions can be suppressed to). This is for use in `finally` blocks to make sure the original exception is not over-thrown. `closeWhileSuppressingExceptions` is the new method. It has a `Throwable` argument that all thrown exceptions can be suppressed to, but also re-throwing Errors to make sure that those take precedence over Exceptions. Eventually, I would like `closeWhileHandlingExceptions` to be removed as it silently swallows non-Error throwables. -- 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