diff options
author | Paul Fertser <fercerpav@gmail.com> | 2015-03-13 16:32:53 +0300 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2015-04-14 12:11:48 +0100 |
commit | 19f219f731f29503c8e4d432935d3ea558cc1659 (patch) | |
tree | d776e27c82b8c7f535c6043e5c275d733c7da019 /doc | |
parent | 33bb0fe6194b697bfc7e89338c0ffac1c54d09be (diff) |
Tcl exception codes cleanup, shutdown command amendments
This patch might influence openocd Tcl commands behaviour in subtle
ways, please give it a nice testing.
The idea is that if an OpenOCD Tcl command returns an error, an
exception is raised, and then the return code is propogated all the
way up (or to the "catch" if present). This allows to detect
"shutdown" which is not actually an error but has to raise an
exception to stop execution of the commands that follow it in the
script.
openocd_thread special-cases shutdown because it should then terminate
OpenOCD with a success error code, unless shutdown was called with an
optional "error" argument which means terminate with a non-zero exit
code.
Change-Id: I7b6fa8a2e24c947dc45d8def0008b4b007c478b3
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2600
Tested-by: jenkins
Reviewed-by: Juha Niskanen <juha.niskanen@haltian.com>
Reviewed-by: Jens Bauer <jens@gpio.dk>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/openocd.texi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi index 4bec637f..e418e050 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -6486,8 +6486,10 @@ Useful in connection with script files (@command{script} command and @command{target_name} configuration). @end deffn -@deffn Command shutdown -Close the OpenOCD daemon, disconnecting all clients (GDB, telnet, other). +@deffn Command shutdown [@option{error}] +Close the OpenOCD daemon, disconnecting all clients (GDB, telnet, +other). If option @option{error} is used, OpenOCD will return a +non-zero exit code to the parent process. @end deffn @anchor{debuglevel} |