logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

VistaIOSetWarningHandler - register a procedure to be called on any nonfatal error

Arguments

handler   Specifies the new nonfatal error handler.

       message   Specifies a null-terminated error message string to be reported.

Author

       Art Pope <pope@cs.ubc.ca>

       Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>

VistaIO Version 1.2.14                          16 February 1994                     VistaIOSetWarningHandler(3)

Description

VistaIOSetWarningHandler registers a procedure, handler, as the nonfatal error handler. That procedure is
       called by VistaIOWarning(3) or by VistaIOSystemWarning(3) to report any nonfatal error. When called it is
       passed a string, message, containing a textual description of the error.

       Only one procedure serves as the nonfatal error handler at any one time.

       Prior  to the first call to VistaIOSetWarningHandler, the procedure VistaIODefaultWarning is the nonfatal
       error handler. This procedure will write the error message to the standard  error  stream,  then  return.
       VistaIODefaultWarning  can  be  re-established  as  the  fatal  error  handler  at  any  time  by calling
       VistaIOSetWarningHandler with a NULL argument.

Examples

       To adopt a warning handler that writes messages both to the standard error stream and to a log file,  one
       might do the following:

              FILE*log_file;voidMyWarningHandler(message)VistaIOStringConstmessage;{fputs(message,stderr);fputs(message,log_file);}intmain(...){
                   ...
                   log_file=fopen("log","w");VistaIOSetWarningHandler(MyWarningHandler);
                   ...
              }

Name

       VistaIOSetWarningHandler - register a procedure to be called on any nonfatal error

See Also

VistaIOWarning(3), VistaIOSetErrorHandler(3),

Synopsis

voidVistaIOSetWarningHandler(VistaIOWarningHandler*handler)typedefvoidVistaIOWarningHandler(VistaIOStringConstmessage);voidVistaIODefaultWarning(VistaIOStringConstmessage);

See Also