bug 322132: Virgo will exit with code 2 if a kernel bundle throws an exception
diff --git a/org.eclipse.virgo.osgi.launcher/src/main/java/org/eclipse/virgo/osgi/launcher/Launcher.java b/org.eclipse.virgo.osgi.launcher/src/main/java/org/eclipse/virgo/osgi/launcher/Launcher.java
index 235f9f8..78b9bca 100644
--- a/org.eclipse.virgo.osgi.launcher/src/main/java/org/eclipse/virgo/osgi/launcher/Launcher.java
+++ b/org.eclipse.virgo.osgi.launcher/src/main/java/org/eclipse/virgo/osgi/launcher/Launcher.java
@@ -30,7 +30,7 @@
private static final String SYSTEM_PROPERTY_TMPDIR = "java.io.tmpdir";
- public static void main(String[] args) throws BundleException, IOException {
+ public static void main(String[] args) throws IOException {
ensureTmpDirExists();
ArgumentParser parser = new ArgumentParser();
@@ -50,8 +50,13 @@
builder.addFrameworkProperty(FRAMEWORK_PROPERTY_UNRECOGNIZED_ARGUMENTS, createUnrecognizedArgumentsProperty(command));
- builder.start();
- }
+ try {
+ builder.start();
+ } catch (BundleException e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
static void ensureTmpDirExists() throws IOException {
String tmpDirProperty = System.getProperty(SYSTEM_PROPERTY_TMPDIR);