Wheefun I/O Library  0.0.5
Useful I/O Primitives.
Typedefs | Enumerations | Functions | Variables
error.h File Reference

Error codes. More...

#include <wfio/host.h>
#include <stdarg.h>

Go to the source code of this file.

Typedefs

typedef WFIO_C_BEGIN enum wfio_ecode_t wfio_ecode_t
 The type of an error code provided by WFIO.
 

Enumerations

enum  wfio_ecode_t {
  WFIO_E_SUCCESS, WFIO_E_UNKNOWN, WFIO_E_NOOBJ, WFIO_E_INVAL,
  WFIO_E_NOMEM, WFIO_E_NOIMPL, WFIO_E_ILSEQ, WFIO_E_DOM,
  WFIO_E_RANGE, WFIO_E_OVERFLOW, WFIO_E_IO, WFIO_E_ACCESS,
  WFIO_E_PERM, WFIO_E_MFILE, WFIO_E_EXISTS, WFIO_E_NOTEXISTS,
  WFIO_E_ISFILE, WFIO_E_NOTFILE, WFIO_E_ISDIR, WFIO_E_NOTDIR,
  WFIO_E_NOENT, WFIO_E_NOTEMPTY, WFIO_E_NOSPC, WFIO_E_BADF,
  WFIO_E_BADCALL
}
 The type of an error code provided by WFIO. More...
 
enum  { WFIO_E_COUNT_ = WFIO_E_BADCALL + 1 }
 

Functions

WFIO_DLL wfio_ecode_t wfio_error_from_errno (int value)
 Translate an OS-specific error code to a WFIO error. More...
 
WFIO_DLL wfio_ecode_t wfio_error_from_doscall (int value)
 

Variables

WFIO_DLL const char *const WFIO_EMSG [WFIO_E_COUNT_]
 String representations of the error codes provided by WFIO.
 

Detailed Description

Error codes.

Author
Phillip Kilgore
Since
0.0.1

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WFIO_E_COUNT_ 

The number of error codes provided by WFIO.

◆ wfio_ecode_t

The type of an error code provided by WFIO.

Enumerator
WFIO_E_SUCCESS 

An "error code" used to indicate success.

WFIO_E_UNKNOWN 

An error code indicating that the cause is unknown.

WFIO_E_NOOBJ 

An error code indicating that the object does not exist.

WFIO_E_INVAL 

An error code indicating that the argument is invalid.

WFIO_E_NOMEM 

An error occurred while trying to allocate memory.

WFIO_E_NOIMPL 

An error occurred because the function isn't implemented.

WFIO_E_ILSEQ 

An error occured because of an illegal multibyte sequence.

WFIO_E_DOM 

An error occurred because the value is not in domain.

WFIO_E_RANGE 

An error occurred because the value is not in range.

WFIO_E_OVERFLOW 

An error occurred because the value cannot fit in the supplied type.

WFIO_E_IO 

An error occurred because a generic I/O error occured.

WFIO_E_ACCESS 

An error occurred because permission was denied.

WFIO_E_PERM 

An error occurred because the operation was not permitted.

WFIO_E_MFILE 

An error occurred because there are too many open files.

WFIO_E_EXISTS 

An error occurred because the resource exists.

WFIO_E_NOTEXISTS 

An error occurred because the resources doesn't exist.

WFIO_E_ISFILE 

An error occurred because the resource is a file.

WFIO_E_NOTFILE 

An error occurred because the resource is not a file.

WFIO_E_ISDIR 

An error occurred because the resource is a directory.

WFIO_E_NOTDIR 

An error occurred because the resource is not a directory.

WFIO_E_NOENT 

An error occurred because there is no such file or directory.

WFIO_E_NOTEMPTY 

An error occurred because the directory was not empty.

WFIO_E_NOSPC 

An error occurred because there is no space left on the device.

WFIO_E_BADF 

An error occurred because the file descriptor was not valid.

WFIO_E_BADCALL 

An error occurred because the call was not recognized.

Function Documentation

◆ wfio_error_from_errno()

WFIO_DLL wfio_ecode_t wfio_error_from_errno ( int  value)

Translate an OS-specific error code to a WFIO error.

Returns
WFIO's best guess concerning how to translate the error.