ICFELL(3NCARG) | NCAR GRAPHICS | ICFELL(3NCARG) |
ICFELL - Called to check for existing error conditions and (perhaps) to update the current error message and error flag.
NERR = ICFELL(MESSG,NERRF)
#include <ncarg/ncargC.h>
int c_icfell(char *messg, int nerrf)
ICFELL (which stands for "I Check For Errors on Lower Level") is used to check for the occurrence of a recoverable error in a lower-level routine and (perhaps) to update the current internal error message and error flag.
The old value of the error flag is returned as the value of the function ICFELL. If that value is zero, nothing else has been done. If the value of ICFELL is non-zero, the following actions have been taken:
An example: Assume that the routine "A" calls the routine "B" and that "B" detects an error and calls SETER with error number "32" and error message "B - ERROR HAS OCCURRED". If recovery mode is not in effect, SETER prints the error message and STOPs; if recovery mode is in effect, control returns from "SETER" to "B" and thence to "A". At that point, the statement "IF (ICFELL('A',13).NE.0) RETURN" detects the fact that an error has occurred in "B" and results in a return from "A" to whatever routine called it. It also changes the current error message to read 'A/B - ERROR HAS OCCURRED' and changes the error number from "32" to "13".
Another example: Assume that the NCAR Graphics routine "A" is called when recovery mode is set and that it detects an error, calls SETER, and RETURNs to the user. If the user neglects to check the error state and calls the routine "B" next, the statement "IF (ICFELL('B - UNCLEARED PRIOR ERROR',1).NE.0) RETURN" ensures that the error message from routine "A" will be printed, that it will be replaced by an error message referring to the routine "B", and that "B" won't do anything else.
The arguments of ICFELL are as follows:
The C-binding argument descriptions are the same as the FORTRAN argument descriptions.
Use the ncargex command to see the following relevant examples: tseter, arex02.
To use ICFELL or c_icfell, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.
Online: entsr, eprin, errof, error_handling, fdum, icloem, nerro, retsr, semess, seter, ncarg_cbind
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
March 1994 | UNIX |