[platform] reporting patch download problems (IDEA-156936)

This commit is contained in:
Roman Shevchenko
2016-07-20 15:18:46 +02:00
parent 969585320b
commit d9617b3fdb
2 changed files with 4 additions and 3 deletions
@@ -40,6 +40,7 @@ import com.intellij.openapi.ui.Messages
import com.intellij.openapi.util.ActionCallback
import com.intellij.openapi.util.BuildNumber
import com.intellij.openapi.util.SystemInfo
import com.intellij.openapi.util.ThrowableComputable
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.text.StringUtil
import com.intellij.util.PlatformUtils
@@ -486,9 +487,10 @@ object UpdateChecker {
@JvmStatic
@Throws(IOException::class)
fun installPlatformUpdate(patch: PatchInfo, toBuild: BuildNumber, forceHttps: Boolean) {
ProgressManager.getInstance().runProcessWithProgressSynchronously( {
ProgressManager.getInstance().runProcessWithProgressSynchronously(ThrowableComputable<Boolean, IOException> {
val indicator = ProgressManager.getInstance().progressIndicator
downloadAndInstallPatch(patch, toBuild, forceHttps, indicator)
true
}, IdeBundle.message("update.downloading.patch.progress.title"), true, null)
}
@@ -40,7 +40,6 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Collection;
import java.util.Date;
@@ -182,7 +181,7 @@ class UpdateInfoDialog extends AbstractUpdateDialog {
restart();
}
catch (IOException e) {
catch (Exception e) {
Logger.getInstance(UpdateChecker.class).warn(e);
if (Messages.showOkCancelDialog(IdeBundle.message("update.downloading.patch.error", e.getMessage()),
IdeBundle.message("updates.error.connection.title"),