aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2018-01-18 13:02:33 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-01-18 13:02:33 +0300
commit6994abc807bf53c335c7c61669ab12832c55d05e (patch)
tree77f1d54727c1deb5da9792bf79b1285b48f11d09
parentf4588208039a735750560eac922471b23804c32d (diff)
downloadbbprb-6994abc807bf53c335c7c61669ab12832c55d05e.tar.gz
BitbucketBuildListener: catch all exceptions
`getCause` may return null, we don't care.
-rw-r--r--src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java
index fc29650..17023b4 100644
--- a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java
+++ b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java
@@ -3,13 +3,13 @@ package org.jenkinsci.plugins.bbprb;
import hudson.Extension;
import hudson.model.AbstractBuild;
import hudson.model.Job;
+import hudson.model.Result;
import hudson.model.TaskListener;
import hudson.model.listeners.RunListener;
import hudson.triggers.Trigger;
-import java.io.IOException;
+import java.lang.Exception;
import java.util.logging.Level;
import java.util.logging.Logger;
-import hudson.model.Result;
import org.jenkinsci.plugins.bbprb.bitbucket.BuildState;
@@ -33,7 +33,7 @@ public class BitbucketBuildListener extends RunListener<AbstractBuild<?, ?>> {
try {
build.setDescription(
build.getCause(BitbucketCause.class).getShortDescription());
- } catch (IOException e) {
+ } catch (Exception e) {
LOGGER.log(Level.WARNING, "Could not set build description: {0}",
e.getMessage());
}