~m-grant-prg/libmgec/focal-trunk

« back to all changes in this revision

Viewing changes to docs/doxygen/src/300-errors.md

  • Committer: Mark Grant
  • Date: 2022-10-17 08:44:00 UTC
  • mfrom: (1.1.67)
  • Revision ID: m.grant.prg@gmail.com-20221017084400-taughsky7zvr4con
Merge new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Errors
 
2
======
 
3
\tableofcontents
 
4
 
 
5
\section errormsgs Messages
 
6
 
 
7
Error message numbers are \#defined in the [mge-errno.h](@ref mge-errno.h)
 
8
header file. The error number is used as the array element in the
 
9
[errno_desc](@ref errno_desc) array.
 
10
 
 
11
\section errorusage Usage
 
12
 
 
13
On error [mge_errno](@ref mge_errno) should be set to a value from the
 
14
[header file](@ref mge-errno.h). If it is set to MGE_ERRNO or MGE_GAI then
 
15
[sav_errno](@ref sav_errno) is set to errno or the getaddrinfo error code
 
16
respectively.
 
17
 
 
18
\section errorfunctions Helper Functions
 
19
 
 
20
\subsection mgestrerror mge_strerror()
 
21
The [mge_strerror](@ref mge_strerror) function returns a string describing the
 
22
error number given in the supplied parameter. If the error number is MGE_ERRNO
 
23
or MGE_GAI then it uses the value held in [sav_errno](@ref sav_errno) to
 
24
retrieve the relevant errno message or getaddrinfo error message.