mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Throw DebugException when getSignals() fails.
This commit is contained in:
parent
dce8a1d011
commit
d80ef3ecc9
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2003-04-23 Mikhail Khodjaiants
|
||||
Throw DebugException when getSignals() fails.
|
||||
* CSignalManager.java
|
||||
|
||||
2003-04-23 Mikhail Khodjaiants
|
||||
Additional checks for the situation when the stack depth is not 0 and
|
||||
the frame array is empty.
|
||||
|
|
|
@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.core;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.cdt.debug.core.CDebugModel;
|
||||
import org.eclipse.cdt.debug.core.ICSignalManager;
|
||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||
import org.eclipse.cdt.debug.core.cdi.ICDIManager;
|
||||
|
@ -14,6 +15,8 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDISignal;
|
|||
import org.eclipse.cdt.debug.core.model.ICSignal;
|
||||
import org.eclipse.cdt.debug.internal.core.model.CDebugTarget;
|
||||
import org.eclipse.cdt.debug.internal.core.model.CSignal;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.debug.core.DebugEvent;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
|
||||
|
@ -54,6 +57,7 @@ public class CSignalManager extends CUpdateManager implements ICSignalManager
|
|||
}
|
||||
catch( CDIException e )
|
||||
{
|
||||
throwDebugException( e.getMessage(), DebugException.TARGET_REQUEST_FAILED, e );
|
||||
}
|
||||
}
|
||||
return ( fSignals != null ) ? fSignals : new ICSignal[0];
|
||||
|
@ -126,4 +130,17 @@ public class CSignalManager extends CUpdateManager implements ICSignalManager
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws a debug exception with the given message, error code, and underlying
|
||||
* exception.
|
||||
*/
|
||||
protected void throwDebugException( String message, int code, Throwable exception ) throws DebugException
|
||||
{
|
||||
throw new DebugException( new Status( IStatus.ERROR,
|
||||
CDebugModel.getPluginIdentifier(),
|
||||
code,
|
||||
message,
|
||||
exception ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue