Catch Throwable instead of Exception and convert to ChronicleHashRecoveryFailedException in ChronicleMapBuilder.openWithExistingFile()

This commit is contained in:
leventov
2017-02-19 20:19:33 -06:00
parent 2ace69ee27
commit 8f9de993d0
@@ -1717,11 +1717,12 @@ public final class ChronicleMapBuilder<K, V> implements
commitChronicleMapReady(map, raf, headerBuffer, headerSize);
}
return map;
} catch (Exception e) {
if (recover && !(e instanceof IOException) &&
!(e instanceof ChronicleHashRecoveryFailedException))
throw new ChronicleHashRecoveryFailedException(e);
throw Throwables.propagateNotWrapping(e, IOException.class);
} catch (Throwable t) {
if (recover && !(t instanceof IOException) &&
!(t instanceof ChronicleHashRecoveryFailedException)) {
throw new ChronicleHashRecoveryFailedException(t);
}
throw Throwables.propagateNotWrapping(t, IOException.class);
}
}