mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Catch Throwable instead of Exception and convert to ChronicleHashRecoveryFailedException in ChronicleMapBuilder.openWithExistingFile()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user