diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2018-01-18 13:02:33 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2018-01-18 13:02:33 +0300 |
commit | 6994abc807bf53c335c7c61669ab12832c55d05e (patch) | |
tree | 77f1d54727c1deb5da9792bf79b1285b48f11d09 /src/main/java/org/jenkinsci | |
parent | f4588208039a735750560eac922471b23804c32d (diff) | |
download | bbprb-6994abc807bf53c335c7c61669ab12832c55d05e.tar.gz |
BitbucketBuildListener: catch all exceptions
`getCause` may return null, we don't care.
Diffstat (limited to 'src/main/java/org/jenkinsci')
-rw-r--r-- | src/main/java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java | 6 |
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()); } |