Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Inglis2003-11-06 18:39:10 +0000
committerDavid Inglis2003-11-06 18:39:10 +0000
commit14df45f11fe21a10452997d8e58422280acfc79a (patch)
tree1946f6b775abb4c243e5767a6a255c2f185bb73a
parent13b7aeb128ff4d4bca13bf145e58d3f97997ce62 (diff)
downloadorg.eclipse.cdt-14df45f11fe21a10452997d8e58422280acfc79a.tar.gz
org.eclipse.cdt-14df45f11fe21a10452997d8e58422280acfc79a.tar.xz
org.eclipse.cdt-14df45f11fe21a10452997d8e58422280acfc79a.zip
fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=46129
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java15
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java2
2 files changed, 9 insertions, 8 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
index 79186371531..4b0462f7064 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
@@ -5,6 +5,7 @@
package org.eclipse.cdt.launch;
import java.io.File;
+import java.io.FileNotFoundException;
import java.text.DateFormat;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -246,7 +247,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
*/
protected void abort(String message, Throwable exception, int code) throws CoreException {
MultiStatus status = new MultiStatus(getPluginID(),code, message,exception);
- status.add(new Status(IStatus.ERROR,getPluginID(),code,exception.getLocalizedMessage(),exception));
+ status.add(new Status(IStatus.ERROR,getPluginID(),code, exception == null ? "" : exception.getLocalizedMessage(),exception));
throw new CoreException(status);
}
@@ -382,16 +383,16 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
String name = getProjectName(config);
if (name == null) {
- abort("C project not specified", null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
+ abort("C Project not specified", null, ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
}
ICProject cproject = getCProject(config);
if (cproject == null) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (!project.exists()) {
- abort("Project does not exist", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
+ abort("Project '"+ name + "' does not exist", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
}
else if (!project.isOpen()) {
- abort("Project is closed", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
+ abort("Project '"+ name + "' is closed", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
}
abort("Project is not a C/C++ project", null, ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
}
@@ -407,7 +408,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
IFile programPath = ((IProject) cproject.getResource()).getFile(fileName);
if (programPath == null || !programPath.exists() || !programPath.getLocation().toFile().exists()) {
- abort("Program file does not exist", null, ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST);
+ abort("Program file does not exist", new FileNotFoundException(programPath.getLocation() + " not found."), ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_EXIST);
}
return programPath;
}
@@ -445,7 +446,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
else {
abort(
"Working directory does not exist",
- null,
+ new FileNotFoundException(path.toOSString() + " not found."),
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
}
}
@@ -457,7 +458,7 @@ abstract public class AbstractCLaunchDelegate implements ILaunchConfigurationDel
else {
abort(
"Working directory does not exist",
- null,
+ new FileNotFoundException(path.toOSString() + "Does not exsit."),
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST);
}
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
index e29aab1423a..c0fb322dd31 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
@@ -80,7 +80,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
final Shell shell = LaunchUIPlugin.getShell();
final String res[] = { null };
if (shell == null) {
- abort("No Shell availible in Launch", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
+ abort("No Shell available in Launch", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
}
Display display = shell.getDisplay();
display.syncExec(new Runnable() {

Back to the top