From 4dd0d4ec05c9242bd3d904b5b6b6eb7dc0312cd0 Mon Sep 17 00:00:00 2001 From: Samuel Hultgren Date: Wed, 18 Apr 2018 16:45:15 +0200 Subject: [PATCH] Bug 533769 - Show error messages directly Include the error message in the message shown directly in the error dialog. Change-Id: I8d6e65353750ee59966ede59b75ebc6256658cb6 Signed-off-by: Samuel Hultgren --- .../eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java index 12b987b8326..b8679645c90 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java @@ -16,6 +16,7 @@ * Marc Khouzam (Ericsson) - Cleanup the launch if it is cancelled (Bug 374374) * Marc-Andre Laperle - Bug 382462 * Marc Khouzam (Ericsson - Show GDB version in debug view node label (Bug 455408) + * Samuel Hultgren (STMicroelectronics) - Bug 533769 *******************************************************************************/ package org.eclipse.cdt.dsf.gdb.launching; @@ -230,7 +231,12 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2 } catch (InterruptedException e1) { throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.INTERNAL_ERROR, "Interrupted Exception in dispatch thread", e1)); //$NON-NLS-1$ } catch (ExecutionException e1) { - throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Error in final launch sequence", e1.getCause())); //$NON-NLS-1$ + final Throwable cause = e1.getCause(); + String message = ""; //$NON-NLS-1$ + if (cause != null) { + message = ":\n\n" + cause.getMessage(); //$NON-NLS-1$ + } + throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Error in final launch sequence" + message, cause)); //$NON-NLS-1$ } catch (CancellationException e1) { // Launch aborted, so exit cleanly return;