Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Commit

Permalink
ProgramUpdater: do not swallow exceptions but log stacktrace to
Browse files Browse the repository at this point in the history
investigate #297
  • Loading branch information
kahlep committed Mar 9, 2020
1 parent 14cb957 commit 20410da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ private static boolean downloadUpdate(Shell parent, final ProgramPackageFile f,
try {
PROGRAM_UPDATER.downloadUpdate(downloadFile, f, monitor, downloadAll);
} catch (Exception e) {
logger.error("Program update could not be downloaded.", e);
throw new InvocationTargetException(e);
}
}
Expand Down Expand Up @@ -503,7 +504,9 @@ public static void checkForUpdatesDialog(Shell parent, String version, Date time
catch (IOException e) {
if (!e.getMessage().equals("stream is closed")) {
TrpMainWidget.getInstance().onError("IO-Error during update", "Error during update: \n\n"+e.getMessage(), e);
}
} else {
logger.error("Program update could not be downloaded or installed.", e);
}
}
catch (Throwable e) {
TrpMainWidget.getInstance().onError("Error during update", "Error during update: \n\n"+e.getMessage(), e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4541,6 +4541,8 @@ public void showUpdateDialog(final String title, final String customMessage) {
} catch (IOException e) {
if (!e.getMessage().equals("stream is closed")) {
TrpMainWidget.getInstance().onError("IO-Error during update", "Error during update: \n\n" + e.getMessage(), e);
} else {
logger.error("Program update could not be downloaded or installed.", e);
}
} catch (Throwable e) {
TrpMainWidget.getInstance().onError("Error during update", "Error during update: \n\n" + e.getMessage(), e);
Expand Down

0 comments on commit 20410da

Please sign in to comment.