Skip to content

Commit

Permalink
tidy exception reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak committed Jan 7, 2025
1 parent 9d98b4a commit 25afc59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1921,9 +1921,8 @@ private void indexParallel(String dir, IndexDownArgs args) throws IndexerExcepti
} catch (InterruptedException | ExecutionException e) {
int successCount = successCounter.intValue();
double successPct = 100.0 * successCount / worksCount;
String exmsg = String.format("%d successes (%.1f%%) after aborting parallel-indexing",
successCount, successPct);
LOGGER.log(Level.SEVERE, exmsg, e);
LOGGER.log(Level.SEVERE, String.format("%d successes (%.1f%%) after aborting parallel-indexing",
successCount, successPct));
throw new IndexerException(e);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public static int runMain(String[] argv) {
} catch (IndexerException ex) {
// The exception(s) were logged already however it does not hurt to reiterate them
// at the very end of indexing (sans the stack trace) since they might have been buried in the log.
LOGGER.log(Level.SEVERE, "Indexer failed", ex);
LOGGER.log(Level.SEVERE, "Indexer failed with IndexerException");
int i = 0;
if (ex.getSuppressed().length > 0) {
LOGGER.log(Level.INFO, "Suppressed exceptions ({0} in total):", ex.getSuppressed().length);
Expand Down

0 comments on commit 25afc59

Please sign in to comment.