mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[platform] reporting patch download problems (IDEA-156936)
This commit is contained in:
+3
-1
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user