On 15 April 2014 00:54, Paul Gilmartin <[email protected]> wrote:

>
> I am not much of a fan of all these handlers:
>

I have a 'signal on novalue' in all my REXX code because it can keep you
busy for hours when there's a typo. But I don't have the actual handler
there unless it's production code. Just get the traceback when it hits. And
in production code I put another signal as Kris says to get the traceback.

Experience shows that it's tedious in a pipeline stage to code the  check
on return code. It turns out to be sufficient to exit on non-zero return
code from the subcommands, which is exactly what 'signal on error' does.
And since we normally consider EOF a good exit, that's where 'return rc *
(rc <> 12)' fits. When I have something that uses the return code for
something else, I put it in a REXX procedure and handle it there. There's a
lot of bonus value in keeping this compact so you can oversee a single
routine.

Rob

Reply via email to