so something like:

if {[catch {set doubled [expr $value * 2]} errmsg]} {
puts "0 - $errmsg"
} else {
puts "1 $doubled"
}

would do the trick?
i'd send all that to OpenOCD?
i now nothing about TCL, just started reading about it

thanks!

On Thu, Jul 28, 2011 at 12:46 PM, Øyvind Harboe <[email protected]> wrote:
> Use tcl catch to wrap what you send and return an error in your preferred
> format.
>
> On Jul 28, 2011 7:46 PM, "Rodrigo Rosa" <[email protected]> wrote:
>> Hi,
>>
>> What are the expected answers from the TCL port (6666)?
>>
>> My tests tell me that you get:
>> - EOC if command syntax was correct
>> - 1EOC if command syntax was incorrect
>> - more stuff if you supply the "capture" argument.
>>
>> is there any way to tell if a command (with correct syntax) returned an
>> error?
>>
>> thanks.
>>
>> --
>> Rodrigo.
>> _______________________________________________
>> Openocd-development mailing list
>> [email protected]
>> https://lists.berlios.de/mailman/listinfo/openocd-development
>



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

Reply via email to