Skip to content

Commit

Permalink
LockableResourcesQueueTaskDispatcher.java : log the whole exception i…
Browse files Browse the repository at this point in the history
…f not a job with params
  • Loading branch information
jimklimov committed Sep 18, 2017
1 parent 3828d4b commit bcc9242
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,12 @@ public CauseOfBlockage canRun(Queue.Item item) {
} catch(Exception ex) {
// Report the error and go on with the build -
// perhaps this item is not a build with args, etc.
Throwable toReport = ex.getCause();
if (toReport == null) { // We care about the cause only
toReport = ex;
}
// Note this is likely to fail a bit later in such case.
if (LOGGER.isLoggable(Level.WARNING)) {
if (lastLogged.getIfPresent(item.getId()) == null) {
lastLogged.put(item.getId(), new Date());
String itemName = project.getFullName() + " (id=" + item.getId() + ")";
LOGGER.log(Level.WARNING, "Failed to get build params from item " + itemName, toReport.getMessage());
LOGGER.log(Level.WARNING, "Failed to get build params from item " + itemName, ex);
}
}
}
Expand Down

0 comments on commit bcc9242

Please sign in to comment.