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