1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 487128: Errors when starting a new process is not propagated to user

This is a follow-up to the work done to show errors when attaching to
processes.  We were also not showing errors when trying to start a new
process using the "Debug new executable..." context menu option of the
debug view.

Change-Id: I9f68410b6d41a28df6f76f63b091a049a38b14e9
This commit is contained in:
Marc Khouzam 2016-02-26 16:24:23 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 3ec5060d54
commit 21e303d976

View file

@ -180,6 +180,14 @@ public class GdbDebugNewExecutableCommand extends RefreshableDebugCommand implem
catch( InterruptedException e ) {
}
catch( ExecutionException e ) {
// There was an error. Propagate it to the user
String errorMessage;
if (e.getCause() != null) {
errorMessage = e.getCause().getMessage();
} else {
errorMessage = e.getMessage();
}
request.setStatus( new Status( IStatus.ERROR, GdbUIPlugin.PLUGIN_ID, errorMessage ) );
}
catch( CancellationException e ) {
// Nothing to do, just ignore the command since the user