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

VistaIOError, VistaIOSystemError - report a fatal error

Arguments

format    Specifies the format of the message that is to be reported.

       arg       Specifies values that are to be included in the formatted message.

Author

       Art Pope <pope@cs.ubc.ca>

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

VistaIO Version 1.2.14                            24 April 1993                                  VistaIOError(3)

Description

VistaIOError  is  called to report a fatal error. It composes an error message and passes it to the fatal
       error   handler,   which   typically   prints   the   message   and   terminates   the    program    (see
       VistaIOSetErrorHandler(3)).

       The message composed by VistaIOError is of the form:

              Program:Fatal:Description.Program,  the  program's  name,  is  included  if  it  has  been  previously  established  with a call to
       VistaIOSetProgramName. Description is a string that has been formatted by sprintf using format, plus  all
       of the optional arguments, arg.

       VistaIOSystemError  is  identical  to  VistaIOError  except that it also includes in the message a phrase
       based on the current value of the external variable errno, which  is  used  by  system  calls  to  return
       diagnostic codes. The message composed by VistaIOSystemError is of the form:

              Program:Fatal:Description:Diagnostic.Diagnostic  is  a  short phrase corresponding to the value of errno.  This phrase is drawn from the table
       used by perror(3).

Examples

       In this first example, the values of attr_name, act_value, and exp_value are incorporated into the  error
       message produced by VistaIOError.

              char*attr_name;floatact_value,exp_value;if(act_value!=exp_value)VistaIOError("MyRoutine:Attribute%sis%fratherthan%f",attr_name,act_value,exp_value);

       In  this  second  example, the diagnostic phrase corresponding to the value of errno is incorporated into
       the error message produced by VistaIOSystemError.

              if(ioctl(fd,request,arg)==-1)VistaIOSystemError("MyRoutine:ioctlfailed");

Name

       VistaIOError, VistaIOSystemError - report a fatal error

Return Values

       Neither VistaIOError nor VistaIOSystemError ever return.

See Also

VistaIOWarning(3), VistaIOSetErrorHandler(3), VistaIOSetProgramName(3), , perror(3)

Synopsis

voidVistaIOError(format [,arg...])VistaIOStringConstformat;voidVistaIOSystemError(format [,arg...])VistaIOStringConstformat;

See Also