Retrieving line number of error with err_get
Posted in 1993
When the WHENEVER ERROR STOP statement is used in an Informix-4gl program, the program aborts and the startlog() function writes the routine name, the line number (well, sort of B-) ), the error code, and corresponding error message out to the errorlog file. I would like to have similar behavior with the WHENEVER ERROR CALL (or even CONTINUE) statements. I have an error_handler function that uses err_get() to read the error messages for the error codes and I put them in the file with errorlog(). How can I get to the routine and line number? I need to have the application used by regular users and record the problems that arrise. My error_handler just records what the error was, not the approximate location of the error. Short of writing error free code from the onset, is there any way I can get the routine name and line numbers for my use? Thanks! -- --------------------------------------------------------------------- Harold L. Trammel h-trammel@uiuc.edu | National Animal Poison Control Center | College of Veterinary Medicine | PRACTICE RANDOM KINDNESS Univ. of Illinois Urbana-Champaign | AND SENSELESS ACTS OF BEAUTY =====================================================================