How to shutdown Equinox on failure? [message #488675] |
Tue, 29 September 2009 17:11 |
Eric Jain Messages: 266 Registered: July 2009 |
Senior Member |
|
|
If one of my bundles fail to initialize properly, I'd like to show an error dialog and shut down the application gracefully.
Calling getWorkbench().close() results in "java.lang.IllegalStateException: Workbench has not been created yet."
EclipseStarter.shutdown() kind of works but it hangs for a long time and the following exception is logged:
java.lang.IllegalStateException: The service has been unregistered
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.setProperties(ServiceRegistrationImpl.java:158)
at org.eclipse.equinox.internal.app.EclipseAppHandle.setAppStatus(EclipseAppHandle.java:157)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:205)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287
Is there another option (other than System.exit(1))?
|
|
|
Powered by
FUDForum. Page generated in 0.03817 seconds