Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] Patch to improve error messages

This patch stops CDT from sensoring error the underlying error message.

E.g. file not found would be replaced by some nonsensical cryptic
generic message.


Consider this a "patch & commit" ping :-)

-- 
Øyvind Harboe
http://www.zylin.com - eCos ARM & FPGA developer kit
### Eclipse Workspace Patch 1.0
#P org.eclipse.cdt.launch
Index: src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java,v
retrieving revision 1.48
diff -u -r1.48 AbstractCLaunchDelegate.java
--- src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java	5 Jul 2007 16:12:24 -0000	1.48
+++ src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java	31 Mar 2008 11:46:36 -0000
@@ -705,13 +705,14 @@
 			}
 		}
 		IBinaryParser parser = CCorePlugin.getDefault().getDefaultBinaryParser();
+		Exception exception;
 		try {
 			return (IBinaryObject)parser.getBinary(exePath);
 		} catch (ClassCastException e) {
+			exception=e;
 		} catch (IOException e) {
+			exception=e;
 		}
-		Throwable exception = new FileNotFoundException(LaunchMessages.getFormattedString(
-				"AbstractCLaunchDelegate.Program_is_not_a_recongnized_executable", exePath.toOSString())); //$NON-NLS-1$
 		int code = ICDTLaunchConfigurationConstants.ERR_PROGRAM_NOT_BINARY;
 		MultiStatus status = new MultiStatus(getPluginID(), code, LaunchMessages
 				.getString("AbstractCLaunchDelegate.Program_is_not_a_recongnized_executable"), exception); //$NON-NLS-1$

Back to the top