Updates: show update problems in balloon, not in the modal dialog

This commit is contained in:
Anton.Makeev
2009-12-03 19:31:47 +03:00
parent 2a26d606e0
commit 0eaa608faa
@@ -26,6 +26,9 @@ package com.intellij.openapi.updateSettings.impl;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.reporter.ConnectionException;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.application.ApplicationInfo;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.PathManager;
@@ -407,13 +410,17 @@ public final class UpdateChecker {
result[0] = DownloadPatchResult.SUCCESS;
}
catch (final IOException e) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Messages.showErrorDialog(e.getMessage(), "Failed to download patch file");
}
});
LOG.info(e);
result[0] = DownloadPatchResult.FAILED;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Notifications.Bus.notify(new Notification("Updater",
"Failed to download patch file",
e.getMessage(),
NotificationType.ERROR));
}
});
}
}
}, IdeBundle.message("update.downloading.patch.progress.title"), true, null)) {