| DocBook: The Definitive Guide 2.0.17 (Alpha)

# errorcode

$Revision: 1666 $

$Date: 2002-06-12 07:19:37 -0400 (Wed, 12 Jun 2002) $

errorcode — An error code

## Synopsis

### Mixed Content Model

    errorcode ::=
    (#PCDATA|replaceable|inlinegraphic|inlinemediaobject|indexterm|
     beginpage)*

### Attributes

Common attributes

Name | Type | Default
moreinfo |
Enumeration:
none
refentry
| "none"

## 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. The `MoreInfo` attribute can help generate a link or query to retrieve additional information.

### Parents

These elements contain errorcode: `action`, `application`, `attribution`, `bibliomisc`, `bridgehead`, `citation`, `citetitle`, `classsynopsisinfo`, `code`, `command`, `computeroutput`, `database`, `emphasis`, `entry`, `filename`, `firstterm`, `foreignphrase`, `funcparams`, `funcsynopsisinfo`, `function`, `glosssee`, `glossseealso`, `glossterm`, `hardware`, `interfacename`, `keycap`, `lineannotation`, `link`, `literal`, `literallayout`, `lotentry`, `member`, `msgaud`, `olink`, `option`, `optional`, `para`, `parameter`, `phrase`, `primary`, `primaryie`, `productname`, `programlisting`, `property`, `quote`, `refdescriptor`, `refentrytitle`, `refname`, `refpurpose`, `remark`, `screen`, `screeninfo`, `secondary`, `secondaryie`, `see`, `seealso`, `seealsoie`, `seeie`, `seg`, `segtitle`, `simpara`, `subtitle`, `synopsis`, `systemitem`, `td`, `term`, `termdef`, `tertiary`, `tertiaryie`, `th`, `title`, `titleabbrev`, `tocback`, `tocentry`, `tocfront`, `trademark`, `ulink`, `userinput`.

### Children

The following elements occur in errorcode: `beginpage`, `indexterm`, `inlinegraphic`, `inlinemediaobject`, `replaceable`.

## Attributes

moreinfo

  If `MoreInfo` is set to `RefEntry`, it implies that a `RefEntry` exists which further describes the `ErrorCode`.

## See Also

`errorname`, `errortext`, `errortype`, `msgset`.

## Examples

    <!DOCTYPE para PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
              "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
    <para>
    On most DOS-derived systems, functions signal a <errortext>File
    Not Found</errortext> error by returning
    <errorcode>2</errorcode> (<errorname>ENOENT</errorname>).  This is usually a
    <errortype>recoverable</errortype> (non-fatal) error.
    </para>

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

    <!DOCTYPE para PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
              "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
    <para>
    On most UNIX systems, functions signal a <errorname>File
    Not Found</errorname> error by returning
    <errorcode>ENOENT</errorcode>, defined in
    <filename>errno.h</filename>.  This is usually a
    <errortype>recoverable</errortype> (non-fatal) error.
    </para>

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.

equation |  | errorname

Copyright © 1999, 2000, 2001, 2002, 2003 O'Reilly & Associates, Inc. All rights reserved.