void (Throwable e, @Nullable @NonNls String message) { if (e instanceof ClosedStorageException) { return; } long storageTimestamp = -1; long vfsTimestamp = getVFSTimestamp(); long timestamp = System.currentTimeMillis(); try { storageTimestamp = myStorage.getFSTimestamp(); } catch (Exception ex) { LocalHistoryLog.LOG.warn("cannot read storage timestamp", ex); } String fullMsg = "Local history is broken" + "(version:" + VERSION + ", current timestamp: " + DateFormat.getDateTimeInstance().format(timestamp) + ", storage timestamp: " + DateFormat.getDateTimeInstance().format(storageTimestamp) + ", vfs timestamp: " + DateFormat.getDateTimeInstance().format(vfsTimestamp) + ", path: " + myStorageDir + ")\n" + message; if (myUnitTestMode) { LocalHistoryLog.LOG.warn(fullMsg, e); } else { LocalHistoryLog.LOG.error(fullMsg, e); } Disposer.dispose(myStorage); try { FileUtil.delete(myStorageDir); initStorage(myStorageDir); } catch (Throwable ex) { LocalHistoryLog.LOG.error("cannot recreate storage", ex); isCompletelyBroken = true; } new Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, LocalHistoryBundle.message("notification.title.local.history.broken"), LocalHistoryBundle.message("notification.content.local.history.broken"), NotificationType.ERROR).notify(null); }