Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Aug 26, 2019
1 parent 85517d7 commit 0f374f1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions documentation/RELEASE_NOTES.html
Expand Up @@ -30,6 +30,27 @@ <h3>Title...</h3>
-->

<h3>Iocsh &quot;on error ...&quot;</h3>

<p>A new statement is added to enable IOC shell commands
to signal error conditions, and for scripts to respond.
This first is through the new function <pre>iocshSetError(int)</pre>
A script may be prefixed with eg. &quot;on error break&quot;
to stop at the failed command.</p>

<pre>
on error continue | break | wait [value] | halt
</pre>

<p>A suggested form for IOC shell commands is:</p>

<pre>
static void doSomethingCallFunc(const iocshArgBuf *args)
{
iocshSetError(doSomething(...)); /* return 0 == success */
}
</pre>

<h1 align="center">EPICS Release 7.0.2.2</h1>

<h3>Build System changes</h3>
Expand Down
5 changes: 5 additions & 0 deletions modules/libcom/src/iocsh/iocsh.h
Expand Up @@ -89,6 +89,11 @@ epicsShareFunc int epicsShareAPI iocshCmd(const char *cmd);
epicsShareFunc int epicsShareAPI iocshLoad(const char *pathname, const char* macros);
epicsShareFunc int epicsShareAPI iocshRun(const char *cmd, const char* macros);

/** @brief Signal error from an IOC shell function.
*
* @param err 0 - success (no op), !=0 - error
* @return The err argument value.
*/
epicsShareFunc int iocshSetError(int err);

/* Makes macros that shadow environment variables work correctly with epicsEnvSet */
Expand Down

0 comments on commit 0f374f1

Please sign in to comment.