icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Others

COM_ERR(3)                                             COM_ERR(3)

       com_err - common error display routine

        #include <com_err.h>

       void com_err (whoami, code, format, ...);
            const char *whoami;
            long code;
            const char *format;

       proc = set_com_err_hook (proc);
       void  (*  proc  )  (const  char  *,  long,  const  char *,

       proc = reset_com_err_hook ();

       void initialize_XXXX_error_table ();

       Com_err displays an error message on  the  standard  error
       stream  stderr  (see  stdio(3S))  composed  of  the whoami
       string, which should specify the program name or some sub-
       portion  of a program, followed by an error message gener-
       ated from the code value (derived from compile_et(1)), and
       a  string produced using the format string and any follow-
       ing arguments, in the same style as fprintf(3).

       The  behavior   of   com_err   can   be   modified   using
       set_com_err_hook; this defines a procedure which is called
       with the arguments  passed  to  com_err,  instead  of  the
       default  internal procedure which sends the formatted text
       to error output.  Thus the error messages from  a  program
       can  all  easily be diverted to another form of diagnostic
       logging, such as  syslog(3).   Reset_com_err_hook  may  be
       used  to  restore  the  behavior of com_err to its default
       form.  Both procedures return the previous ``hook'' value.
       These  ``hook'' procedures must have the declaration given
       for proc above in the synopsis.

       The  initialize_XXXX_error_table  routine   is   generated
       mechanically  by compile_et(1) from a source file contain-
       ing names and associated strings.  Each table has  a  name
       of  up  to  four characters, which is used in place of the
       XXXX in the name of the routine.  These routines should be
       called  before  any  of  the corresponding error codes are
       used, so that the com_err  library  will  recognize  error
       codes from these tables when they are used.

       The com_err.h header file should be included in any source
       file that uses routines from  the  com_err  library;  exe-
       cutable  files must be linked using ``-lcom_err'' in order
       to cause the com_err library to be included.

SIPB                       22 Nov 1988                          1

COM_ERR(3)                                             COM_ERR(3)

       compile_et (1), syslog (3).

       Ken Raeburn,  "A  Common  Error  Description  Library  for

SIPB                       22 Nov 1988                          2

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
FreeBSD Sources for com_err(3) functions
OpenBSD sources for com_err(3)

[Overview Topics]

Up to: Error Handling and Logging - Handling errors and logging. (syslog, error tables, et al)

RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Others

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > com_err.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments