From 6994abc807bf53c335c7c61669ab12832c55d05e Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Thu, 18 Jan 2018 13:02:33 +0300 Subject: BitbucketBuildListener: catch all exceptions `getCause` may return null, we don't care. --- .../java/org/jenkinsci/plugins/bbprb/BitbucketBuildListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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> { 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()); } -- cgit v1.2.3