DsSetErrorVars(3D) — Kubota Pacfic Computer Inc. (\*(Dd)
NAME
DsSetErrorVars − Specify an error file and error handler
SYNOPSIS
C:
void DsSetErrorVars(errorfile, errorhandler)
DtInt errorfile;
DtPFI errorhandler;
FORTRAN:
CALL DSSEV(ERRFIL, ERRHND)
INTEGER∗4 ERRFIL
EXTERNAL ERRHND
DESCRIPTION
DsSetErrorVars installs an application error file descriptor and error handler. The parameter errorfile specifies the file descriptor to which any error messages should be sent. The value 2 is usually standard error, i.e., the terminal, and is also the default error file.
The parameter errorhandler specifies the error handling procedure to be called when errors are detected. If this parameter is DcNullPtr <DCNULL>, the default error handler prints the error information to errorfile and, if the error is fatal, it exits the program.
Your error handling procedure in C should have this format:
MyErrorFunction(errorfile, errornumber, funcname,
errorstring)
DtInt errorfile;
DtPtr funcname;/∗ the name of the function where
the error occurred ∗/
DtInt errornumber;/∗ the error number ∗/
DtPtr errorstring;/∗ an additional string provided by
funcname describing the error ∗/
FORTRAN SPECIFIC
FORTRAN should have this format:
ERRFUN(ERRFIL, ERRNUM, FCNNAM, FCNNML,
ERRSTR, ERRSTL)
INTEGER∗4 ERRFIL
INTEGER∗4 ERRNUM
INTEGER∗4 FCNNML
INTEGER∗4 ERRSTL
CHARACTER∗FCNNML FCNNAM
CHARACTER∗ERRSTL ERRSTR
Where FCNNAM is a function name FCNNML characters long and ERRSTR is an error string ERRSTL characters long.
SEE ALSO
September 02, 1992