From 2d284f4e3a0b4cefa0becb922d3ad939aa076db6 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 12 Mar 2012 11:28:34 +0100 Subject: Log a clean message when an exception is thrown during picocontainer startup --- sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sonar-batch/src') diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java index 7c05398b27d..3de296ae89b 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java @@ -20,9 +20,11 @@ package org.sonar.batch.bootstrapper; import com.google.common.collect.Lists; +import org.slf4j.LoggerFactory; import org.sonar.api.batch.bootstrap.ProjectReactor; import org.sonar.batch.bootstrap.BootstrapModule; import org.sonar.batch.bootstrap.Module; +import org.sonar.core.PicoUtils; import java.util.Arrays; import java.util.List; @@ -69,6 +71,8 @@ public final class Batch { Module bootstrapModule = new BootstrapModule(projectReactor, components.toArray(new Object[components.size()])).init(); try { bootstrapModule.start(); + } catch (RuntimeException e) { + PicoUtils.handleStartupException(e, LoggerFactory.getLogger(getClass())); } finally { try { bootstrapModule.stop(); -- cgit v1.2.3