Skip to content

Commit

Permalink
Improve error notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
petebankhead committed Sep 10, 2024
1 parent 79d6cbf commit d10243f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## v0.1.5
- Improve behavior of `FXUtils.installSelectAllOrNoneMenu` (https://github.com/qupath/qupath/issues/1498)
- New `FXUtils.addCloseWindowShortcuts` methods to enable closing windows from the keyboard
- Improve error notifications when there is no associated text

## v0.1.4
- Make yes/no/cancel dialog non-resizable, for consistency (https://github.com/qupath/qupath-fxtras/issues/26)
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/qupath/fx/dialogs/Dialogs.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,11 @@ public static void showErrorNotification(final String title, final Throwable e)
logger.error(title + ": " + e.getLocalizedMessage(), e);
else
logger.error(title , e);
} else
} else {
if (message == null || message.isBlank())
message = "Unknown error (" + e.getClass().getSimpleName() + ")";
showNotification(title, message, AlertType.ERROR);
}
}

/**
Expand Down

0 comments on commit d10243f

Please sign in to comment.