errorcode

errorcode — An error code.

Synopsis

errorcode ::=

Attributes

Common attributes and common linking attributes.

No additional attributes.

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.

Attributes

Common attributes and common linking attributes.

any attribute

Any attribute in any other explicit namespace

Parents

These elements contain errorcode: bridgehead, caption (db.html.caption), citation, citetitle, classsynopsisinfo, contrib, emphasis (db.emphasis), entry, enumitemdescription, firstterm (db.firstterm), funcsynopsisinfo, glosssee, glossseealso, glossterm (db.glossterm), link, literallayout, member, meta (db.meta.content), olink, orgdiv, para, phrase (db.phrase), primary, primaryie, programlisting, quote (db.quote), refdescriptor, refentrytitle, refname, refpurpose, remark, screen, secondary, secondaryie, see, seealso, seealsoie, seeie, seg, segtitle, simpara, subtitle, synopsis, synopsisinfo, td, term, termdef, tertiary, tertiaryie, th, title, titleabbrev, tocentry.

Children

The following elements occur in errorcode: text, abbrev, acronym, alt, anchor, annotation, biblioref, coref, date, emphasis (db._emphasis), firstterm (db._firstterm), footnote, footnoteref, foreignphrase (db._foreignphrase), glossterm (db._glossterm), indexterm (db.indexterm.endofrange), indexterm (db.indexterm.singular), indexterm (db.indexterm.startofrange), inlinemediaobject, link, olink, phrase (db._phrase), quote (db._quote), remark, replaceable, subscript, superscript, trademark, wordasword, xref.

See Also

Related elements: errorname, errortext, errortype, msgset.

Examples

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