Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2009-08-07 19:20:37 +0000
committerThomas Watson2009-08-07 19:20:37 +0000
commit4b3bed557f18c0f6b6101e90499dc5f2d380705d (patch)
tree59d3c2a2adf9073dcea73839bc6b75564853aa2c
parent2637568642f722ada90cc284f06755ac9dcbfa78 (diff)
downloadrt.equinox.framework-4b3bed557f18c0f6b6101e90499dc5f2d380705d.tar.gz
rt.equinox.framework-4b3bed557f18c0f6b6101e90499dc5f2d380705d.tar.xz
rt.equinox.framework-4b3bed557f18c0f6b6101e90499dc5f2d380705d.zip
Bug 277058 Nothing written to log if bundle could not be resolved due to missing dependenciesv20090810
-rw-r--r--bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java32
1 files changed, 18 insertions, 14 deletions
diff --git a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
index 3f797d1f5..9a4ea4d53 100644
--- a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
+++ b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
@@ -183,11 +183,9 @@ public class EclipseStarter {
endSplashHandler.run();
// may use startupFailed to understand where the error happened
FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, startupFailed ? EclipseAdaptorMsg.ECLIPSE_STARTUP_STARTUP_ERROR : EclipseAdaptorMsg.ECLIPSE_STARTUP_APP_ERROR, 1, e, null);
- if (log != null) {
+ if (log != null)
log.log(logEntry);
- if (context != null) // this can be null if OSGi failed to launch (bug 151413)
- logUnresolvedBundles(context.getBundles());
- } else
+ else
// TODO desperate measure - ideally, we should write this to disk (a la Main.log)
e.printStackTrace();
} finally {
@@ -357,17 +355,23 @@ public class EclipseStarter {
// if we are just initializing, do not run the application just return.
if (initialize)
return new Integer(0);
- if (appLauncher == null) {
- boolean launchDefault = Boolean.valueOf(FrameworkProperties.getProperty(PROP_APPLICATION_LAUNCHDEFAULT, "true")).booleanValue(); //$NON-NLS-1$
- // create the ApplicationLauncher and register it as a service
- appLauncher = new EclipseAppLauncher(context, Boolean.valueOf(FrameworkProperties.getProperty(PROP_ALLOW_APPRELAUNCH)).booleanValue(), launchDefault, log);
- appLauncherRegistration = context.registerService(ApplicationLauncher.class.getName(), appLauncher, null);
- // must start the launcher AFTER service restration because this method
- // blocks and runs the application on the current thread. This method
- // will return only after the application has stopped.
- return appLauncher.start(argument);
+ try {
+ if (appLauncher == null) {
+ boolean launchDefault = Boolean.valueOf(FrameworkProperties.getProperty(PROP_APPLICATION_LAUNCHDEFAULT, "true")).booleanValue(); //$NON-NLS-1$
+ // create the ApplicationLauncher and register it as a service
+ appLauncher = new EclipseAppLauncher(context, Boolean.valueOf(FrameworkProperties.getProperty(PROP_ALLOW_APPRELAUNCH)).booleanValue(), launchDefault, log);
+ appLauncherRegistration = context.registerService(ApplicationLauncher.class.getName(), appLauncher, null);
+ // must start the launcher AFTER service restration because this method
+ // blocks and runs the application on the current thread. This method
+ // will return only after the application has stopped.
+ return appLauncher.start(argument);
+ }
+ return appLauncher.reStart(argument);
+ } catch (Exception e) {
+ if (log != null && context != null) // context can be null if OSGi failed to launch (bug 151413)
+ logUnresolvedBundles(context.getBundles());
+ throw e;
}
- return appLauncher.reStart(argument);
}
/**

Back to the top