Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Amend JENKINS-24110 fix to more politely specify what was not being run.
  • Loading branch information
jglick committed Aug 2, 2017
1 parent 45aa332 commit 8c7d06c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/java/hudson/model/Executor.java
Expand Up @@ -355,6 +355,10 @@ public SubTask call() throws Exception {
LOGGER.log(FINE, getName()+" grabbed "+workUnit+" from queue");
SubTask task = workUnit.work;
Executable executable = task.createExecutable();
if (executable == null) {
String displayName = task instanceof Queue.Task ? ((Queue.Task) task).getFullDisplayName() : task.getDisplayName();
LOGGER.log(WARNING, "{0} cannot be run (for example because it is disabled)", displayName);
}
lock.writeLock().lock();
try {
Executor.this.executable = executable;
Expand Down Expand Up @@ -387,7 +391,7 @@ public SubTask call() throws Exception {
// by tasks. In such case Jenkins starts the workUnit in order
// to report results to console outputs.
if (executable == null) {
throw new Error("The null Executable has been created for "+workUnit+". The task cannot be executed");
return;
}

if (executable instanceof Actionable) {
Expand Down

0 comments on commit 8c7d06c

Please sign in to comment.