Review Exception throwing and handling throughtput the library, create specific InterProcessDeadLockException for Chronicle Map deadlocks

This commit is contained in:
leventov
2016-11-19 19:14:53 -06:00
parent 5ae69c3035
commit 37d82f290a
37 changed files with 477 additions and 286 deletions
@@ -264,15 +264,19 @@ public class ReplicatedChronicleMap<K, V, R> extends VanillaChronicleMap<K, V, R
}
@Override
protected void doClose() {
protected void doClose(Throwable thrown) {
for (Closeable closeable : closeables) {
try {
closeable.close();
} catch (IOException e) {
LOG.error("", e);
} catch (Throwable t) {
if (thrown == null) {
thrown = t;
} else {
thrown.addSuppressed(t);
}
}
}
super.doClose();
super.doClose(thrown);
}
@Override