Skip to content

Commit

Permalink
improve error handling for upgrading packages missing from repositori…
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Sep 10, 2024
1 parent e84a8a2 commit 5e61736
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/beastfx/app/beauti/JPackageDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,18 @@ private HBox createButtonBox() {
}

try {
try {
populatePackagesToInstall(packageMap, packagesToInstall);
} catch (IllegalArgumentException ex) {
setCursor(Cursor.DEFAULT);
Alert.showMessageDialog(null, "Something went wrong (" + ex.getMessage() + ") "
+ "\n\nPossibly the package is installed by hand and "
+ "there is no package repository containing the package. Such packages "
+ "cannot be upgraded.\n\nSet up the appropriate package repository to "
+ "upgrade the package."
);
return;
}
populatePackagesToInstall(packageMap, packagesToInstall);

prepareForInstall(packagesToInstall, false, null);
Expand Down

0 comments on commit 5e61736

Please sign in to comment.