Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorJohn Cortell2007-06-18 20:53:34 +0000
committerJohn Cortell2007-06-18 20:53:34 +0000
commitc1eac4b95e5bc301e5b33994fbd3c6c83093cbfa (patch)
tree91e606d59c6d1b7390724098058e7e33c9c8cdda /debug
parent94652e017d202d359d02c0a3c395032cf121540d (diff)
downloadorg.eclipse.cdt-c1eac4b95e5bc301e5b33994fbd3c6c83093cbfa.tar.gz
org.eclipse.cdt-c1eac4b95e5bc301e5b33994fbd3c6c83093cbfa.tar.xz
org.eclipse.cdt-c1eac4b95e5bc301e5b33994fbd3c6c83093cbfa.zip
Fixed 193198. If an error was encountered by an action delegate, it would be eaten.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties1
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ErrorStatusHandler.java17
2 files changed, 14 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties
index fb8fbbac88c..3c1274d4215 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties
@@ -39,3 +39,4 @@ CDTDebugModelPresentation.24=-Infinity
CDTDebugModelPresentation.25=(disabled)
CBreakpointWorkbenchAdapterFactory.0=C/C++ breakpoint
CBreakpointWorkbenchAdapterFactory.1=C/C++ watchpoint
+ErrorStatusHandler.1=Error \ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ErrorStatusHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ErrorStatusHandler.java
index 03c32ea5d98..d6c8ea12d09 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ErrorStatusHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/ErrorStatusHandler.java
@@ -27,13 +27,22 @@ public class ErrorStatusHandler implements IStatusHandler {
* @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
*/
public Object handleStatus( final IStatus status, Object source ) throws CoreException {
- if ( status != null && source != null && source instanceof IDebugElement ) {
- IDebugTarget target = ((IDebugElement)source).getDebugTarget();
- final String title = target.getName();
+ if ( status != null && source != null ) {
+ String title = "";
+ if (source instanceof IDebugElement) {
+ IDebugTarget target = ((IDebugElement)source).getDebugTarget();
+ title = target.getName();
+ }
+ else {
+ // Source is sometimes an action delegate instance. Can't gather
+ // anything useful from it. Use a generic title
+ title = CDebugUIMessages.getString("ErrorStatusHandler.1");
+ }
+ final String title_f = title;
CDebugUIPlugin.getStandardDisplay().asyncExec( new Runnable() {
public void run() {
- ErrorDialog.openError( CDebugUIPlugin.getActiveWorkbenchShell(), title, null, status );
+ ErrorDialog.openError( CDebugUIPlugin.getActiveWorkbenchShell(), title_f, null, status );
}
} );
}

Back to the top