+ private static void safeLoggingClose(AutoCloseable closeable, Path file) {
+ if (closeable == null)
+ return;
+ try (AutoCloseable c = closeable) {
+ } catch (Exception e) {
+ LOGGER.error("Failed to close " + closeable.getClass() + " of " + file.toAbsolutePath(), e);
+ }
+ }
+
+ private static void safeLoggingClose(Database.Session session, Path file) {
+ if (session == null)
+ return;
+ try {
+ session.close();
+ } catch (Exception e) {
+ LOGGER.error("Failed to close " + session.getClass() + " of " + file.toAbsolutePath(), e);
+ }
+ }
+