[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-debug-dev] Wrong status handler for launch error code 101: Working directory does not exist
|
Hi All,
The plugin org.eclipse.cdt.debug.core defines an error code
ICDTLaunchConfigurationConstants.ERR_WORKING_DIRECTORY_DOES_NOT_EXIST
with the value 101.
Another plugin org.eclipse.cdt.launch contributes a status handler to
this error code through its plugin.xml file like so:
<extension
point="org.eclipse.debug.core.statusHandlers">
statusHandler
code="101"
plugin="org.eclipse.cdt.launch"
class="org.eclipse.cdt.launch.internal.ui.CoreFilePrompter"
id="org.eclipse.cdt.launch.statusHandler.coreFilePrompter">
</statusHandler>
</extension>
However, the status handler class handles errors where user has not
specified a core dump file for post mortem debug (status code 108:
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE). Thus there is a
mismatch between the functionality of the status code and the status
handler. Due to this, when the user enters an invalid path for the
working directory, the launch fails, but the user never gets to see the
error dialog which displays the message: "Working directory does not
exist". The reason why the launch does not display the error message
dialog is that the status object is handed off to the contributed status
handler. Due to the mismatch, there is a ClassCastException in the
status handler code and the launch fails silently. Changing the status
code of the status handler contribution in the plugin.xml exposes the
correct error message to the user.
I think the status handler is meant for the status code 108:
ICDTLaunchConfigurationConstants.ERR_NO_COREFILE
Thanks
Abeer
Tensilica Technologies India