On Monday 04 January 2010, Øyvind Harboe wrote:
> > Thanks for your reply to my email. I guess my point
> > was implied: ERROR_COMMAND_CLOSE_CONNECTION is
> > returned when openocd does what I ask and it doesn't
> > actually represent an error condition.
> 
> To check for such a specific error message at such a high
> level is not a robust approach.

The issue is that closing a connection is *NOT AN ERROR* but a
routine activity.  Those messages have bothered me too.


> A better way would be to push 
> the ignoring of error messages up the call stack to the "right"
> level, whatever that is...

I'd have said this particular check should move "down" to lower
level code, closer to whatever is mis-reporting a routine state
transition as an error.

But I haven't looked at it.  Frequently upper level code does
need to understand state transitions ... and it's best to see
such stuff passed explicitly (as some kind of function return)
rather than through any kind of side effect.

- Dave

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to