From bf690f60d8bc8000a169970d2e1d7fd97bf78c10 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 15 Feb 2019 17:33:21 +0100 Subject: [PATCH] Not throwing exception on MakeBuildUnstableException --- .../cloud/release/internal/ReleaserApplication.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java b/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java index d3d0ea85..ab18c3a3 100644 --- a/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java +++ b/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java @@ -43,6 +43,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.release.internal.options.Options; import org.springframework.cloud.release.internal.options.Parser; import org.springframework.cloud.release.internal.spring.SpringReleaser; +import org.springframework.cloud.release.internal.tech.MakeBuildUnstableException; @SpringBootApplication public class ReleaserApplication implements CommandLineRunner { @@ -62,9 +63,15 @@ public class ReleaserApplication implements CommandLineRunner { application.setWebApplicationType(WebApplicationType.NONE); application.run(args); } - catch (Throwable e) { - log.error("Exception occurred for the releaser", e); - throw e; + catch (MakeBuildUnstableException ex) { + log.error( + "[BUILD UNSTABLE] The release happened successfully, but there were post release issues"); + log.error("[BUILD UNSTABLE] An exception that should make " + + "the build unstable occurred. Will not throw an exception."); + } + catch (Throwable th) { + log.error("Exception occurred for the releaser", th); + throw th; } }