Re: WHENEVER ANY ERROR CONTINUE fails
Posted in 1998
Daniel Wright wrote: > > Has anyone seen this happen? Does anyone know a fix? > > details...details...yes > HP-UX 10.20 Informix 7.21.UC1 > All 4GL > A Library function in one module called from a function in another > library module. > The 2nd nested library module function has the "WHENEVER ANY ERROR > CONTINUE" statement, and then calls another function within its own > module. This called function has a PREPARE, which has a syntax error, > but instead of "CONTINUE"ing, it dies (no core dump, no nothing....but > to STDERR, a la WHENEVER ERROR STOP)....I've carefully studied the code, > and there are no intermediate functions which could change this. > > [If that's not clear....there is a program, call it "A", which is linked > to 2 separate libraries "L1" and "L2". "A" calls a function in "L1", > which calls a function in "L2". "L2" explicitly says "WHENEVER ANY > ERROR CONTINUE", something which was also in "A". The function called > in "L2" (from "L1") calls another function in "L2" which contains a > syntax error. The program stops, spits out to stderr.] > > That's it for the other one. > > I swear to god there are no intervening function calls which might set > "WHENEVER ANY ERROR STOP" or even "WHENEVER ERROR STOP" in between. > > I did a simple test case to verify that "WHENEVER ANY ERROR CONTINUE" > does work, and even included the error in another module (alhtough it > was not a library), and it certainly was not one library function called > from another library function, but it worked as expectd (and has been > working for some months now.) > > As always, many thanks for any input.... > > - Danny Wright > > reply to danwright@toofgib.com (reverser toofgib to get > bigfoot.....just trying to keep the SPAM to a minimum) I presume that you are aware that the WHENEVER statements are compiler switches and have scope extending through the source to the next WHENEVER statment, not run-time scope. Having said that, I had some horrid bugs in version 6.02 of 4GL with WHENEVER. Basically it worked sometimes and not others. I suggest you have a look a the C code generated by the 4GL compiler and make sure that all the post-statement checking code you expect is there. -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 Mail: Peter.Lancashire.PL1@bayer.co.uk --- My Internet plumbing does not allow me to mail and post news together. Sorry. All opinions are my own and not those of Bayer plc. --- Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/