mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
added throw of CoreExecption
This commit is contained in:
parent
5c5930d219
commit
83bb6180d5
2 changed files with 5 additions and 8 deletions
|
@ -4,7 +4,9 @@
|
|||
*/
|
||||
package org.eclipse.cdt.debug.core;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
public interface ICDebuggerManager {
|
||||
public ICDebugger createDebugger(String id);
|
||||
public ICDebugger createDebugger(String id) throws CoreException;
|
||||
public ICDebuggerInfo[] queryDebuggers(String platform_id);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public class CDebuggerManager implements ICDebuggerManager {
|
|||
public CDebuggerManager() {
|
||||
}
|
||||
|
||||
public ICDebugger createDebugger(String id) {
|
||||
public ICDebugger createDebugger(String id) throws CoreException {
|
||||
ICDebugger debugger = null;
|
||||
|
||||
IExtensionPoint extension = CDebugCorePlugin.getDefault().getDescriptor().getExtensionPoint("CDebugger");
|
||||
|
@ -30,12 +30,7 @@ public class CDebuggerManager implements ICDebuggerManager {
|
|||
for(int i = 0; i < extensions.length; i++){
|
||||
if ( id.equals(extensions[i].getUniqueIdentifier()) ) {
|
||||
IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
|
||||
try {
|
||||
debugger = (ICDebugger)configElements[0].createExecutableExtension("class");
|
||||
}
|
||||
catch (CoreException e) {
|
||||
return null;
|
||||
}
|
||||
debugger = (ICDebugger)configElements[0].createExecutableExtension("class");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue