Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ OlError(3W) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought



Error(3W)                        UNIX System V                        Error(3W)


NAME
      Error: OlError, OlWarning, OlVaDisplayErrorMsg, OlVaDisplayWarningMsg,
      OlSetErrorHandler, OlSetWarningHandler, OlSetVaDisplayErrorMsgHandler,
      OlSetVaDisplayWarningMsgHandler - error and warning message handling

SYNOPSIS
      #include <Intrinsic.h>
      #include <OpenLook.h>

      void OlError(msg)
           String     msg;          /* error message string          */

      void OlWarning(msg)
           String     msg;          /* warning message string        */

      void OlVaDisplayErrorMsg(dpy, name, type, class, defaultmsg, ...)
           Display *  dpy;          /* Display pointer or NULL      */
           String     name;         /* message name                 */
           String     type;         /* message type                 */
           String     class;        /* message class                */
           String     defaultmsg;  /* message format string        */
           ...                      /* variable arguments for       */
                                    /* the message format string    */

      void OlVaDisplayWarningMsg(dpy, name, type, class, defaultmsg, ...)
           Display *  dpy;          /* Display pointer or NULL      */
           String     name;         /* message name                 */
           String     type;         /* message type                 */
           String     class;        /* message class                */
           String     defaultmsg;  /* message format string        */
           ...                      /* variable arguments for       */
                                    /* the message format string    */

      OlErrorHandler
      OlSetErrorHandler(handler)
           OlErrorHandler     handler;     /* handler or NULL     */

      OlWarningHandler
      OlSetWarningHandler(handler)
           OlWarningHandler     handler;  /* handler or NULL      */

      OlVaDisplayErrorMsgHandler
      OlSetVaDisplayErrorMsgHandler(handler)
           OlVaDisplayErrorMsgHandler     handler;   /* handler or NULL*/

      OlVaDisplayWarningMsgHandler
      OlSetVaDisplayWarningMsgHandler(handler)
           OlVaDisplayWarningMsgHandler     handler; /* handler or NULL*/

      typeder void     (*OlErrorHandler)(
              String    msg           /* error message string      */
      );


10/89                                                                    Page 1







Error(3W)                        UNIX System V                        Error(3W)


      typeder void     (*OlWarningHandler)(
              String    msg           /* warning message string    */
      );

      typedef void (*OlVaDisplayErrorMsgHandler)(
           Display *  dpy,          /* Display pointer or NULL   */
           String     name,         /* message name              */
           String     type,         /* message type              */
           String     class,        /* message class             */
           String     defaultmsg,  /* message format string     */
           valist    ap            /* variable arguments for    */
                                    /* the message format string */
      );

      typedef void (*OlVaDisplayWarningMsgHandler)(
           Display *  dpy,         /* Display pointer or NULL    */
           String     name,        /* message name               */
           String     type,        /* message type               */
           String     class,       /* message class              */
           String     defaultmsg, /* message format string      */
           valist    ap           /* variable arguments for     */
                                   /* the message format string  */
      );


DESCRIPTION
      OlError writes a simple string to stderr and then exits.  OlWarning
      writes a simple string to stderr and then returns.

      OlVaDisplayErrorMsg writes an error to stderr and exits. The error
      message is looked up in the error database by calling
      XtAppGetErrorDatabaseText using the name, type, and class arguments.  If
      no message is found in the error database, the defaultmsg string is
      used.  The application context is determined by calling
      XtDisplayToApplicationContext with the supplied Display pointer.  If the
      display pointer is NULL, the display created at application startup is
      used to determine the application context.

      OlVaDisplayWarningMsg has the same semantics as OlVaDisplayErrorMsg
      except it returns instead of exiting.

      OlSetErrorHandler, OlSetWarningHandler, OlSetVaDisplayErrorMsgHandler,
      and OlSetVaDisplayWarningMsgHandler allow an application to override the
      various warning and error handlers.  These routines return a pointer to
      the previous handler.  If NULL is supplied to any of these routines, the
      default handler will be used.

      Since the error routines normally exit the program, application-supplied
      error handlers should do the same since continuation of an application
      will result in undefined behavior.




Page 2                                                                    10/89







Error(3W)                        UNIX System V                        Error(3W)


   NOTE
      Most programs should not use OlError and OlWarning since they don't allow
      for customization and internationalization.

      Since OpenLook.h does not include stdarg.h (or varargs.h), an application
      using OlSetVaDisplayErrorMsgHandler or OlSetVaDisplayWarningMsgHandler
      should include one of these two headers before including OpenLook.h to
      insure the correct function prototype will be used for the application's
      error/warning handler.













































10/89                                                                    Page 3





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026