Hello Rob,

Are you sure this will work in all cases?

The SIGNAL ON ERROR will react to any non-zero returncode. STREAMSTATE ca
n 
have returncodes 0, 4 and 8, and it looks to me that all three are 
acceptable, at least in my case. Only rc=12, stream not connected, is 

indeed the returncode I will trigger upon. But the SIGNAL ON ERROR will 

exit the stage in all returncodes other than zero.

But more in general, there are more commands that will exit a returncode 

based on their function. WAKEUP for instance. Just a small test confirms 

this:

signal on error         
'wakeup +00:30 (cons'   
say rc                  
error:                  
exit rc                 

The result is that wakeup will return rc=2 when the timer expires and 6
 
when the console interrupt is received. In both cases valid returncodes, 

or perhaps required returncodes, but in both cases the SIGNAL traps 
the 'error' and skips the "SAY rc" command.

In such cases it looks like errorhandeling should be coded for every 
individual event instead of a general error handeling trap.

Regards, Berry.

On Mon, 9 Jun 2008 21:38:15 +0200, Rob van der Heij <[EMAIL PROTECTED]> 

wrote:

>signal on error
>do forever
>   peekto
>   .. process..
>   readto
>   streamstate output
>end
>error: return rc * ( rc <> 12 )

Reply via email to