Skip to content
Permalink
Browse files

[JENKINS-10880] output the job when polling fails

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 7066daf3ee9d75d427918b068293e5b4ebbc98cd
Showing with 5 additions and 5 deletions.
  1. +5 −5 core/src/main/java/hudson/triggers/SCMTrigger.java
@@ -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;
}
}

0 comments on commit 7066daf

Please sign in to comment.
You can’t perform that action at this time.