Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362796

Summary: Process detach is not implemented, but the error code is misleading
Product: [Tools] TCF Reporter: Frederic Leger <frederic.leger>
Component: AgentAssignee: Project Inbox <tcf.agent-inbox>
Status: RESOLVED FIXED QA Contact: Eugene Tarassov <eugene>
Severity: trivial    
Priority: P3 CC: cdtdoug, mober.at+eclipse
Version: unspecified   
Target Milestone: 0.6.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Frederic Leger CLA 2011-11-03 10:16:17 EDT
Build Identifier: 

While developping a TCF client, I had a hard time trying to find why the Processes.detach () would not work. Toni Leherbauer pointed me at the agent source code which states :

static void command_detach(char * token, Channel * c) {
    /* TODO: implement command_detach() */
    exception(ERR_PROTOCOL);
}

I lost time because the error code is not the appropriate one from my point of view. I tried to double check all the json stuff, and could not find why I would get a protocol error.

I found at least two error code which would be a bit more appropriate :

#define ERR_UNSUPPORTED         (STD_ERR_BASE + 23)
#define ERR_INV_COMMAND         (STD_ERR_BASE + 25) 

Could it be possible to return a better error message ?

Thanks

DERF


Reproducible: Always

Steps to Reproduce:
1. attach to a process
2. try to detach from that process
3.
Comment 1 Eugene Tarassov CLA 2011-11-03 15:30:22 EDT
I have changed the code to return properly formatted error report that reads "Detach is not implemented yet. Unsupported command".

Thanks.