Bug 362796 - Process detach is not implemented, but the error code is misleading
Summary: Process detach is not implemented, but the error code is misleading
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 trivial (vote)
Target Milestone: 0.6.0   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 10:16 EDT by Frederic Leger CLA
Modified: 2013-06-05 06:07 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.