Re: Signal Handling in 4gl
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
>>>> Brian Hampson <brian@ASL.CA> 09/02/99 01:07AM >>> >Shevkar, Mukund (Mukund.Shevkar@dgs.ca.gov) wrote: >: >: This is a very general kind of thing happens to programmers. >: Following code structure will help >: >: Whenever error continue >: (your source code that SELECTs rows) >: If sqlca.sqlerrd[3] > 1 then >: (rows returned > 1) >: (action you may take) >: end if >: Whenever error stop > >I was hoping that there might be a more general solution, since I don't >know what errors might occur, and it would be nice to have some sort of >trap function like signal(3) Try WHENEVER ERROR error_func FUNCTION error_func Do lots of nice things to tidy up and if I hate the user exit END FUNCITON Paul Watson WF Software Ltd Tel: +44 1436 674729 Fax: +44 1436 678729 www.wfsoftware.com/informix # If you broke it, hide the evidence ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************