Skip to content

Commit

Permalink
Merge pull request #32 from jglick/TryRepeatedly-anonDiscover-JENKINS…
Browse files Browse the repository at this point in the history
…-42556

[JENKINS-42556] Handle runtime exceptions from printWaitingMessage
  • Loading branch information
jglick committed Mar 14, 2017
2 parents 6fce277 + 3c076a7 commit 494446b
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -26,6 +26,7 @@

import com.google.common.util.concurrent.AbstractFuture;
import com.google.common.util.concurrent.ListenableFuture;
import hudson.Functions;
import hudson.console.ModelHyperlinkNote;
import hudson.model.TaskListener;
import java.io.IOException;
Expand Down Expand Up @@ -92,7 +93,12 @@ public void run() {
if (v == null) {
if (retriesRemaining == 0) {
try {
printWaitingMessage(getOwner().getListener());
TaskListener listener = getOwner().getListener();
try {
printWaitingMessage(listener);
} catch (Exception x) {
listener.getLogger().println(Functions.printThrowable(x).trim()); // TODO 2.43+ use Functions.printStackTrace
}
} catch (IOException x) {
LOGGER.log(Level.WARNING, null, x);
}
Expand Down

0 comments on commit 494446b

Please sign in to comment.