1 /*****************************************************************************/
2 /*									     */
3 /*				  SYSERROR.H				     */
4 /*									     */
5 /* (C) 1995-96	Ullrich von Bassewitz					     */
6 /*		Wacholderweg 14						     */
7 /*		D-70597 Stuttgart					     */
8 /* EMail:	uz@ibb.schwaben.com					     */
9 /*									     */
10 /*****************************************************************************/
11 
12 
13 
14 // $Id$
15 //
16 // $Log$
17 //
18 //
19 
20 
21 
22 #ifndef _SYSERROR_H
23 #define _SYSERROR_H
24 
25 
26 
27 #include <errno.h>
28 
29 #include "str.h"
30 
31 
32 
33 /*****************************************************************************/
34 /*				     Code				     */
35 /*****************************************************************************/
36 
37 
38 
39 String GetSysErrorMsg (int Errno);
40 // This function tries to map a system error code to an error message in the
41 // current language. This is not as easy as it seems, since the error codes
42 // not only differ from operating system to operating system, but also from
43 // compiler to compiler. If there is no predefined message, a default message
44 // including the error number and the error string from sys_errlist (in
45 // english) is returned.
46 // Please note: The use of this function is not, to provide a verbose error
47 // message for each and every error code, but to provide messages of the more
48 // common errors. So, for example, EBADF ("bad file number") will _not_ get
49 // mapped, since this error code denotes a program bug, but ENOENT _will_
50 // map to a verbose message, because this error may happen on a bad user input.
51 
52 
53 
54 // End of SYSERROR.H
55 
56 #endif
57