ENhanced blog post generation; fixes gh-94

This commit is contained in:
Marcin Grzejszczak
2018-10-29 10:46:28 +01:00
parent 21d5ccc1c8
commit dacba0314e
10 changed files with 140 additions and 128 deletions

View File

@@ -32,9 +32,14 @@ public class ReleaserApplication implements CommandLineRunner {
private static final Logger log = LoggerFactory.getLogger(ReleaserApplication.class);
public static void main(String[] args) {
SpringApplication application = new SpringApplication(ReleaserApplication.class);
application.setWebApplicationType(WebApplicationType.NONE);
application.run(args);
try {
SpringApplication application = new SpringApplication(ReleaserApplication.class);
application.setWebApplicationType(WebApplicationType.NONE);
application.run(args);
} catch (Throwable e) {
log.error("Exception occurred for the releaser", e);
throw e;
}
}
@Autowired SpringReleaser releaser;
@@ -44,8 +49,8 @@ public class ReleaserApplication implements CommandLineRunner {
Options options = this.parser.parse(strings);
try {
this.releaser.release(options);
} catch (Exception e) {
log.error("Exception occurred for the releaser. Picked options were [" + options + "]", e);
} catch (Throwable e) {
log.error("Exception occurred for the releaser. Picked options were [" + options + "]");
throw e;
}
System.exit(0);