Skip to content

Commit

Permalink
Added logging of how many files were supposed to be opened and how ma…
Browse files Browse the repository at this point in the history
…ny failed.
  • Loading branch information
Oliver-Loeffler committed Nov 8, 2022
1 parent 750c728 commit 9e60b1a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ private FileOpenResult performOpenFiles(List<File> fxmlFiles) {
assert fxmlFiles != null;
assert fxmlFiles.isEmpty() == false;

LOGGER.log(Level.FINE, "Opening {0} files...", fxmlFiles.size());
final Map<File, Exception> exceptions = new HashMap<>();
final List<File> openedFiles = new ArrayList<>();
for (File fxmlFile : fxmlFiles) {
Expand Down Expand Up @@ -764,7 +765,11 @@ private FileOpenResult performOpenFiles(List<File> fxmlFiles) {
final PreferencesController pc = PreferencesController.getSingleton();
pc.getRecordGlobal().addRecentItems(openedFiles);
}

if (exceptions.size() > 0) {
LOGGER.log(Level.WARNING, "Failed to open {0} of {1} files!", new Object[] {exceptions.size(), fxmlFiles.size()});
} else {
LOGGER.log(Level.FINE, "Successfully opened all files.");
}
return new FileOpenResult(fxmlFiles, exceptions);
}

Expand Down

0 comments on commit 9e60b1a

Please sign in to comment.