Skip to content

Commit

Permalink
[JENKINS-10880] output the job when polling fails
Browse files Browse the repository at this point in the history
When polling fails for some reason, it simply outputs
"Failed to record SCM polling" which is not very helpful.
At least add the job, like it is done already in the thread name:
"Failed to record SCM polling for "+job
  • Loading branch information
marc-guenther committed Apr 10, 2012
1 parent 1803f9d commit 7066daf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/main/java/hudson/triggers/SCMTrigger.java
Expand Up @@ -425,18 +425,18 @@ private boolean runPolling() {
logger.println("No changes");
return result;
} catch (Error e) {
e.printStackTrace(listener.error("Failed to record SCM polling"));
LOGGER.log(Level.SEVERE,"Failed to record SCM polling",e);
e.printStackTrace(listener.error("Failed to record SCM polling for "+job));
LOGGER.log(Level.SEVERE,"Failed to record SCM polling for "+job,e);
throw e;
} catch (RuntimeException e) {
e.printStackTrace(listener.error("Failed to record SCM polling"));
LOGGER.log(Level.SEVERE,"Failed to record SCM polling",e);
e.printStackTrace(listener.error("Failed to record SCM polling for "+job));
LOGGER.log(Level.SEVERE,"Failed to record SCM polling for "+job,e);
throw e;
} finally {
listener.close();
}
} catch (IOException e) {
LOGGER.log(Level.SEVERE,"Failed to record SCM polling",e);
LOGGER.log(Level.SEVERE,"Failed to record SCM polling for "+job,e);
return false;
}
}
Expand Down

0 comments on commit 7066daf

Please sign in to comment.