Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/jobs/CheckForUpdatesJob.java

Issue 10660016: Update manager fixes to handle update check failures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/jobs/CheckForUpdatesJob.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/jobs/CheckForUpdatesJob.java (revision 9083)
+++ editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/jobs/CheckForUpdatesJob.java (working copy)
@@ -31,6 +31,7 @@
private final DownloadManager downloadManager;
private Revision latest;
+ private String message;
/**
* Create an instance.
@@ -43,6 +44,15 @@
}
/**
+ * Get details in case an error occurred during check for updates.
+ *
+ * @return the message a displayable error message (or <code>null</code> if none was recorded)
+ */
+ public String getErrorMessage() {
+ return message;
+ }
+
+ /**
* Get the latest available update.
*
* @return the latest update, or <code>null</code> if it has not been retrieved yet
@@ -56,7 +66,8 @@
try {
latest = downloadManager.getLatestRevision();
} catch (IOException e) {
- return UpdateCore.createErrorStatus("Unable to get latest revision: " + e.getMessage()); //$NON-NLS-1$
+ message = "Unable to get latest revision.";
+ UpdateCore.logError(message);//$NON-NLS-1$
}
return Status.OK_STATUS;
}

Powered by Google App Engine
This is Rietveld 408576698