mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-12 11:35:21 +02:00
Fix for PR 46850: Unable to report problems from the methods of 'ICDIRuntimeOptions'.
This commit is contained in:
parent
6b9e66e8a6
commit
52ecc62130
4 changed files with 22 additions and 12 deletions
|
@ -3,6 +3,10 @@
|
|||
'setCurrentThread': check if the old current thread is not null.
|
||||
* CDebugTarget.java
|
||||
|
||||
2003-10-07 Mikhail Khodjaiants
|
||||
All methods of 'IRuntimeOptions' should throw CDI exceptions in case of failure.
|
||||
* ICDIRuntimeOptions.java
|
||||
|
||||
2003-09-30 Mikhail Khodjaiants
|
||||
Use the new 'equals' method of ICDIVaraiableObject to compare variables.
|
||||
* CVariable.java
|
||||
|
|
|
@ -20,19 +20,19 @@ public interface ICDIRuntimeOptions {
|
|||
*
|
||||
* @param args the string representing the arguments.
|
||||
*/
|
||||
void setArguments(String[] args);
|
||||
void setArguments(String[] args) throws CDIException;
|
||||
|
||||
/**
|
||||
* Program/Inferior environment settings.
|
||||
*
|
||||
* @param props the new environment variable to add.
|
||||
*/
|
||||
void setEnvironment(Properties props);
|
||||
void setEnvironment(Properties props) throws CDIException;
|
||||
|
||||
/**
|
||||
* Program/Inferior working directory.
|
||||
*
|
||||
* @param wd the working directory to start the program.
|
||||
*/
|
||||
void setWorkingDirectory(String wd);
|
||||
void setWorkingDirectory(String wd) throws CDIException;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-10-07 Mikhail Khodjaiants
|
||||
|
||||
All methods of 'IRuntimeOptions' should throw CDI exceptions in case of failure.
|
||||
* src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java
|
||||
|
||||
2003-09-30 Alain Magloire
|
||||
|
||||
ICDIVariableObject.equals();
|
||||
|
|
|
@ -8,6 +8,7 @@ package org.eclipse.cdt.debug.mi.core.cdi;
|
|||
import java.util.Iterator;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIRuntimeOptions;
|
||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||
|
@ -30,7 +31,7 @@ public class RuntimeOptions implements ICDIRuntimeOptions {
|
|||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIRuntimeOptions#setArguments(String)
|
||||
*/
|
||||
public void setArguments(String[] args) {
|
||||
public void setArguments(String[] args) throws CDIException {
|
||||
if (args == null || args.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -41,17 +42,17 @@ public class RuntimeOptions implements ICDIRuntimeOptions {
|
|||
mi.postCommand(arguments);
|
||||
MIInfo info = arguments.getMIInfo();
|
||||
if (info == null) {
|
||||
//throw new CDIException("No answer");
|
||||
throw new CDIException("Unable to set arguments: target is not responding");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
//throw new CDIException(e.getMessage());
|
||||
throw new CDIException("Unable to set arguments: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIRuntimeOptions#setEnvironment(Properties)
|
||||
*/
|
||||
public void setEnvironment(Properties props) {
|
||||
public void setEnvironment(Properties props) throws CDIException {
|
||||
if (props == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -73,10 +74,10 @@ public class RuntimeOptions implements ICDIRuntimeOptions {
|
|||
mi.postCommand(set);
|
||||
MIInfo info = set.getMIInfo();
|
||||
if (info == null) {
|
||||
//throw new CDIException("No answer");
|
||||
throw new CDIException("Unable to set environment: target is not responding");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
//throw new CDIException(e.getMessage());
|
||||
throw new CDIException("Unable to set environment: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +85,7 @@ public class RuntimeOptions implements ICDIRuntimeOptions {
|
|||
/**
|
||||
* @see org.eclipse.cdt.debug.core.cdi.ICDIRuntimeOptions#setWorkingDirectory(String)
|
||||
*/
|
||||
public void setWorkingDirectory(String wd) {
|
||||
public void setWorkingDirectory(String wd) throws CDIException {
|
||||
if (wd == null || wd.length() == 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -95,10 +96,10 @@ public class RuntimeOptions implements ICDIRuntimeOptions {
|
|||
mi.postCommand(cd);
|
||||
MIInfo info = cd.getMIInfo();
|
||||
if (info == null) {
|
||||
//throw new CDIException("No answer");
|
||||
throw new CDIException("Unable to set working directory: target is not responding");
|
||||
}
|
||||
} catch (MIException e) {
|
||||
//throw new CDIException(e.getMessage());
|
||||
throw new CDIException("Unable to set working directory: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue