errorcode

errorcode — An error code.

Synopsis

Description

An error code. Error codes are often numeric, but in some environments they may be symbolic constants.

DocBook provides four elements for identifying the parts of an error message: errorcode, for the alphanumeric error code (e.g., “–2”); errorname, for the symbolic name of the error (e.g., “ENOENT”); errortext, for the text of the error message (e.g., “file not found”); and errortype, for the error type (e.g., “recoverable”).

Processing expectations

Formatted inline.

Parents [+]

This element occurs in 49 elements.

Children [+]

This element contains 16 elements.

Examples

  1 <article xmlns='http://docbook.org/ns/docbook'>
  2 <title>Example errorcode</title>
    
  4 <para>On most DOS-derived systems, functions signal a <errortext>File
    Not Found</errortext> error by returning
  6 <errorcode>2</errorcode> (<errorname>ENOENT</errorname>).  This is usually a
    <errortype>recoverable</errortype> (non-fatal) error.
  8 </para>
    
 10 </article>

On most DOS-derived systems, functions signal a File Not Found error by returning 2 (ENOENT). This is usually a recoverable (non-fatal) error.

  1 <article xmlns='http://docbook.org/ns/docbook'>
  2 <title>Example errorcode</title>
    
  4 <para>On most UNIX systems, functions signal a <errorname>File
    Not Found</errorname> error by returning
  6 <errorcode>ENOENT</errorcode>, defined in 
    <filename>errno.h</filename>.  This is usually a
  8 <errortype>recoverable</errortype> (non-fatal) error.
    </para>
 10 
    </article>

On most UNIX systems, functions signal a File Not Found error by returning ENOENT, defined in errno.h. This is usually a recoverable (non-fatal) error.

Last revised by Norman Walsh on 6 Jun 2011 (git hash: 6ffcc7640bbc5f852a318e452c9f210f03292cb9)