Bug 312109 - Starting application that requires main thread when it is not available throws meaningless exception
diff --git a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java
index 53a0354..55e2f23 100644
--- a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java
+++ b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java
@@ -325,7 +325,7 @@
defaultMainThreadAppHandle = appHandle;
return;
}
- throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR);
+ throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, NLS.bind(Messages.application_error_noMainThread, appHandle.getInstanceId()));
}
curDefaultApplicationListener = defaultAppListener;
curMissingAppLauncher = missingAppLauncher;
diff --git a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java
index 4f2eab8..dd53d48 100755
--- a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java
+++ b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@
public static String application_error_stopping;
public static String application_error_state_stopped;
public static String application_error_starting;
+ public static String application_error_noMainThread;
public static String application_instance_stopped;
// product
diff --git a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties
index 280e5c1..66bdefb 100755
--- a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties
+++ b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@
application_error_stopping=An error occurred while stopping the application: {0}
application_error_state_stopped=This instance of the application has been stopped: {0}
application_error_starting=An error occurred while starting the application: {0}
+application_error_noMainThread = The main thread is not available to launch the application: {0}
application_instance_stopped=The application instance has been stopped before it could be started: {0}
### product
provider_invalid_general = Errors while processing the product providers.