From: Sahananda (J. W. <sah...@wi...> - 2011-04-26 14:42:28
|
Thanks Bob, I imagine we will have some centralised error handling, in an oo sort of way, so it will probably look something like this in the individual scripts *signal on any* > > *... code...* > > *any:* > *signal off any* > *parse source . . program_name* > *call errorRoutine condition('o'), program_name* > > *::requires (our library containing the routine errorRoutine)* > *... other directives ...* > The others may also have ideas about this. It is really important that the till is bullet-proof. So whatever errors ghet thrown at it, the show must go on! As well as Rexx errors we may have to handle database errors too. All that fun ahead of us. Jon On 26 April 2011 15:18, Robert Hamilton <bob...@gm...> wrote: > I was thinking of things like this > > • > Generally dealing with exceptions > – > Copy the label and its code to the end of your programs > – > Activate the exception handling with the "SIGNAL ON" statement at the > beginning of your program > SIGNAL ON ANY /* no label, hence "ANY" */ > ... Your Rexx-code ... > ANY: /* target for any exception */ > exc_rc = RC /* save return code */ > exc_sigl = SIGL /* save line number */ > exc_type = CONDITION("C") /* get exception type */ > CALL say2stderr "REXX 'RC':" exc_rc > CALL say2stderr " type:" exc_type > CALL say2stderr > CALL say2stderr " in line:" exc_sigl > CALL say2stderr " " SOURCELINE(exc_sigl) > EXIT -1 /* indicate error */ > SAY2STDERR: /* write to STDERR: */ > CALL LINEOUT "STDERR:", ARG(1) > RETURN > > BobH > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Rexxtill-devel mailing list > Rex...@li... > https://lists.sourceforge.net/lists/listinfo/rexxtill-devel > > |