modules/portlib/src/main/native/include/shared/hyporterror.h File Reference


Detailed Description

Port Library Error Codes.

When an error is reported by the operating system the port library must translate this OS specific error code to a portable error code. All portable error codes are negative numbers. Not every module of the port library will have error codes dedicated to it's own use, some will use the generic portable error code values.

Errors reported by the OS may be recorded by calling the port library functions hyerror_set_last_error() or hyerror_set_last_error_with_message(). The mapping of the OS specific error code to a portable error code is the responsibility of the calling module.


Defines

Generic Errors
Generic error codes for modules that do not have their own specific errors.

Where possible it is recommended that all modules that return error codes have their own set

#define HYPORT_ERROR_BASE   -1
#define HYPORT_ERROR_OPFAILED   HYPORT_ERROR_BASE
#define HYPORT_ERROR_EOF   HYPORT_ERROR_BASE-1
#define HYPORT_ERROR_NOPERMISSION   HYPORT_ERROR_BASE-2
#define HYPORT_ERROR_NOTFOUND   HYPORT_ERROR_BASE-3
#define HYPORT_ERROR_NAMETOOLONG   HYPORT_ERROR_BASE-4
#define HYPORT_ERROR_DISKFULL   HYPORT_ERROR_BASE-5
#define HYPORT_ERROR_EXIST   HYPORT_ERROR_BASE-6
#define HYPORT_ERROR_NOTEXIST   HYPORT_ERROR_BASE-7
#define HYPORT_ERROR_SYSTEMFULL   HYPORT_ERROR_BASE-8
#define HYPORT_ERROR_NOENT   HYPORT_ERROR_BASE-9
#define HYPORT_ERROR_DIRECTORY   HYPORT_ERROR_BASE-10
#define HYPORT_ERROR_NOTDIRECTORY   HYPORT_ERROR_BASE-11
#define HYPORT_ERROR_LOOP   HYPORT_ERROR_BASE-12
#define HYPORT_ERROR_BADF   HYPORT_ERROR_BASE-13
#define HYPORT_ERROR_WOULDBLOCK   HYPORT_ERROR_BASE-14
#define HYPORT_ERROR_INVALID   HYPORT_ERROR_BASE-15
Port Library startup failure code
Failures related to the initialization and startup of the port library.

#define HYPORT_ERROR_STARTUP_BASE   -100
#define HYPORT_ERROR_STARTUP_THREAD   (HYPORT_ERROR_STARTUP_BASE)
#define HYPORT_ERROR_STARTUP_MEM   (HYPORT_ERROR_STARTUP_BASE -1)
#define HYPORT_ERROR_STARTUP_TLS   (HYPORT_ERROR_STARTUP_BASE -2)
#define HYPORT_ERROR_STARTUP_TLS_ALLOC   (HYPORT_ERROR_STARTUP_BASE -3)
#define HYPORT_ERROR_STARTUP_TLS_MUTEX   (HYPORT_ERROR_STARTUP_BASE -4)
#define HYPORT_ERROR_STARTUP_CPU   (HYPORT_ERROR_STARTUP_BASE -5)
#define HYPORT_ERROR_STARTUP_VMEM   (HYPORT_ERROR_STARTUP_BASE -6)
#define HYPORT_ERROR_STARTUP_FILE   (HYPORT_ERROR_STARTUP_BASE -7)
#define HYPORT_ERROR_STARTUP_TTY   (HYPORT_ERROR_STARTUP_BASE -8)
#define HYPORT_ERROR_STARTUP_TTY_HANDLE   (HYPORT_ERROR_STARTUP_BASE -9)
#define HYPORT_ERROR_STARTUP_TTY_CONSOLE   (HYPORT_ERROR_STARTUP_BASE -10)
#define HYPORT_ERROR_STARTUP_MMAP   (HYPORT_ERROR_STARTUP_BASE -11)
#define HYPORT_ERROR_STARTUP_IPCMUTEX   (HYPORT_ERROR_STARTUP_BASE -12)
#define HYPORT_ERROR_STARTUP_NLS   (HYPORT_ERROR_STARTUP_BASE -13)
#define HYPORT_ERROR_STARTUP_SOCK   (HYPORT_ERROR_STARTUP_BASE -14)
#define HYPORT_ERROR_STARTUP_TIME   (HYPORT_ERROR_STARTUP_BASE -15)
#define HYPORT_ERROR_STARTUP_GP   (HYPORT_ERROR_STARTUP_BASE -16)
#define HYPORT_ERROR_STARTUP_EXIT   (HYPORT_ERROR_STARTUP_BASE -17)
#define HYPORT_ERROR_STARTUP_SYSINFO   (HYPORT_ERROR_STARTUP_BASE -18)
#define HYPORT_ERROR_STARTUP_SL   (HYPORT_ERROR_STARTUP_BASE -19)
#define HYPORT_ERROR_STARTUP_STR   (HYPORT_ERROR_STARTUP_BASE -20)
#define HYPORT_ERROR_STARTUP_SHSEM   (HYPORT_ERROR_STARTUP_BASE -21)
#define HYPORT_ERROR_STARTUP_SHMEM   (HYPORT_ERROR_STARTUP_BASE -22)
#define HYPORT_ERROR_STARTUP_ERROR   (HYPORT_ERROR_STARTUP_BASE -23)
#define HYPORT_ERROR_STARTUP_SIGNAL   (HYPORT_ERROR_STARTUP_BASE -24)
Shared Semaphore Errors
Error codes for shared semaphore operations.

#define HYPORT_ERROR_SHSEM_BASE   -150
#define HYPORT_ERROR_SHSEM_OPFAILED   (HYPORT_ERROR_SHSEM_BASE)
#define HYPORT_ERROR_SHSEM_HANDLE_INVALID   (HYPORT_ERROR_SHSEM_BASE-1)
#define HYPORT_ERROR_SHSEM_SEMSET_INVALID   (HYPORT_ERROR_SHSEM_BASE-2)
#define HYPORT_ERROR_SHSEM_NOT_EXIST   (HYPORT_ERROR_SHSEM_BASE-3)
#define HYPORT_ERROR_SHSEM_NOPERMISSION   (HYPORT_ERROR_SHSEM_BASE-4)
#define HYPORT_ERROR_SHSEM_INVALID_INPUT   (HYPORT_ERROR_SHSEM_BASE-5)
#define HYPORT_ERROR_SHSEM_NOSPACE   (HYPORT_ERROR_SHSEM_BASE-6)
#define HYPORT_ERROR_SHSEM_ALREADY_EXIST   (HYPORT_ERROR_SHSEM_BASE-7)
#define HYPORT_ERROR_SHSEM_DATA_DIRECTORY_FAILED   (HYPORT_ERROR_SHSEM_BASE-8)
Shared Memory Errors
Error codes for shared memory semaphore operations.

#define HYPORT_ERROR_SHMEM_BASE   -160
#define HYPORT_ERROR_SHMEM_OPFAILED   (HYPORT_ERROR_SHMEM_BASE)
#define HYPORT_ERROR_SHMEM_HANDLE_INVALID   (HYPORT_ERROR_SHMEM_BASE-1)
#define HYPORT_ERROR_SHMEM_NOT_EXIST   (HYPORT_ERROR_SHMEM_BASE-2)
#define HYPORT_ERROR_SHMEM_NOPERMISSION   (HYPORT_ERROR_SHMEM_BASE-3)
#define HYPORT_ERROR_SHMEM_INVALID_INPUT   (HYPORT_ERROR_SHMEM_BASE-4)
#define HYPORT_ERROR_SHMEM_NOSPACE   (HYPORT_ERROR_SHMEM_BASE-5)
#define HYPORT_ERROR_SHMEM_ALREADY_EXIST   (HYPORT_ERROR_SHMEM_BASE-6)
#define HYPORT_ERROR_SHMEM_TOOBIG   (HYPORT_ERROR_SHMEM_BASE-7)
#define HYPORT_ERROR_SHMEM_ATTACH_FAILED   (HYPORT_ERROR_SHMEM_BASE-8)
#define HYPORT_ERROR_SHMEM_DATA_DIRECTORY_FAILED   (HYPORT_ERROR_SHMEM_BASE-9)
Socket Errors
Error codes for socket operations

#define HYPORT_ERROR_SOCKET_BASE   -200
#define HYPORT_ERROR_SOCKET_BADSOCKET   HYPORT_ERROR_SOCKET_BASE
#define HYPORT_ERROR_SOCKET_NOTINITIALIZED   HYPORT_ERROR_SOCKET_BASE-1
#define HYPORT_ERROR_SOCKET_BADAF   HYPORT_ERROR_SOCKET_BASE-2
#define HYPORT_ERROR_SOCKET_BADPROTO   HYPORT_ERROR_SOCKET_BASE-3
#define HYPORT_ERROR_SOCKET_BADTYPE   HYPORT_ERROR_SOCKET_BASE-4
#define HYPORT_ERROR_SOCKET_SYSTEMBUSY   HYPORT_ERROR_SOCKET_BASE-5
#define HYPORT_ERROR_SOCKET_SYSTEMFULL   HYPORT_ERROR_SOCKET_BASE-6
#define HYPORT_ERROR_SOCKET_NOTCONNECTED   HYPORT_ERROR_SOCKET_BASE-7
#define HYPORT_ERROR_SOCKET_INTERRUPTED   HYPORT_ERROR_SOCKET_BASE-8
#define HYPORT_ERROR_SOCKET_TIMEOUT   HYPORT_ERROR_SOCKET_BASE-9
#define HYPORT_ERROR_SOCKET_CONNRESET   HYPORT_ERROR_SOCKET_BASE-10
#define HYPORT_ERROR_SOCKET_WOULDBLOCK   HYPORT_ERROR_SOCKET_BASE-11
#define HYPORT_ERROR_SOCKET_ADDRNOTAVAIL   HYPORT_ERROR_SOCKET_BASE-12
#define HYPORT_ERROR_SOCKET_ADDRINUSE   HYPORT_ERROR_SOCKET_BASE-13
#define HYPORT_ERROR_SOCKET_NOTBOUND   HYPORT_ERROR_SOCKET_BASE-14
#define HYPORT_ERROR_SOCKET_UNKNOWNSOCKET   HYPORT_ERROR_SOCKET_BASE-15
#define HYPORT_ERROR_SOCKET_INVALIDTIMEOUT   HYPORT_ERROR_SOCKET_BASE-16
#define HYPORT_ERROR_SOCKET_FDSETFULL   HYPORT_ERROR_SOCKET_BASE-17
#define HYPORT_ERROR_SOCKET_TIMEVALFULL   HYPORT_ERROR_SOCKET_BASE-18
#define HYPORT_ERROR_SOCKET_REMSOCKSHUTDOWN   HYPORT_ERROR_SOCKET_BASE-19
#define HYPORT_ERROR_SOCKET_NOTLISTENING   HYPORT_ERROR_SOCKET_BASE-20
#define HYPORT_ERROR_SOCKET_NOTSTREAMSOCK   HYPORT_ERROR_SOCKET_BASE-21
#define HYPORT_ERROR_SOCKET_ALREADYBOUND   HYPORT_ERROR_SOCKET_BASE-22
#define HYPORT_ERROR_SOCKET_NBWITHLINGER   HYPORT_ERROR_SOCKET_BASE-23
#define HYPORT_ERROR_SOCKET_ISCONNECTED   HYPORT_ERROR_SOCKET_BASE-24
#define HYPORT_ERROR_SOCKET_NOBUFFERS   HYPORT_ERROR_SOCKET_BASE-25
#define HYPORT_ERROR_SOCKET_HOSTNOTFOUND   HYPORT_ERROR_SOCKET_BASE-26
#define HYPORT_ERROR_SOCKET_NODATA   HYPORT_ERROR_SOCKET_BASE-27
#define HYPORT_ERROR_SOCKET_BOUNDORCONN   HYPORT_ERROR_SOCKET_BASE-28
#define HYPORT_ERROR_SOCKET_OPNOTSUPP   HYPORT_ERROR_SOCKET_BASE-29
#define HYPORT_ERROR_SOCKET_OPTUNSUPP   HYPORT_ERROR_SOCKET_BASE-30
#define HYPORT_ERROR_SOCKET_OPTARGSINVALID   HYPORT_ERROR_SOCKET_BASE-31
#define HYPORT_ERROR_SOCKET_SOCKLEVELINVALID   HYPORT_ERROR_SOCKET_BASE-32
#define HYPORT_ERROR_SOCKET_TIMEOUTFAILURE   HYPORT_ERROR_SOCKET_BASE-33
#define HYPORT_ERROR_SOCKET_SOCKADDRALLOCFAIL   HYPORT_ERROR_SOCKET_BASE-34
#define HYPORT_ERROR_SOCKET_FDSET_SIZEBAD   HYPORT_ERROR_SOCKET_BASE-35
#define HYPORT_ERROR_SOCKET_UNKNOWNFLAG   HYPORT_ERROR_SOCKET_BASE-36
#define HYPORT_ERROR_SOCKET_MSGSIZE   HYPORT_ERROR_SOCKET_BASE-37
#define HYPORT_ERROR_SOCKET_NORECOVERY   HYPORT_ERROR_SOCKET_BASE-38
#define HYPORT_ERROR_SOCKET_ARGSINVALID   HYPORT_ERROR_SOCKET_BASE-39
#define HYPORT_ERROR_SOCKET_BADDESC   HYPORT_ERROR_SOCKET_BASE-40
#define HYPORT_ERROR_SOCKET_NOTSOCK   HYPORT_ERROR_SOCKET_BASE-41
#define HYPORT_ERROR_SOCKET_HOSTENTALLOCFAIL   HYPORT_ERROR_SOCKET_BASE-42
#define HYPORT_ERROR_SOCKET_TIMEVALALLOCFAIL   HYPORT_ERROR_SOCKET_BASE-43
#define HYPORT_ERROR_SOCKET_LINGERALLOCFAIL   HYPORT_ERROR_SOCKET_BASE-44
#define HYPORT_ERROR_SOCKET_IPMREQALLOCFAIL   HYPORT_ERROR_SOCKET_BASE-45
#define HYPORT_ERROR_SOCKET_FDSETALLOCFAIL   HYPORT_ERROR_SOCKET_BASE-46
#define HYPORT_ERROR_SOCKET_OPFAILED   HYPORT_ERROR_SOCKET_BASE-47
#define HYPORT_ERROR_SOCKET_VALUE_NULL   HYPORT_ERROR_SOCKET_BASE-48
#define HYPORT_ERROR_SOCKET_CONNECTION_REFUSED   HYPORT_ERROR_SOCKET_BASE-49
#define HYPORT_ERROR_SOCKET_ENETUNREACH   HYPORT_ERROR_SOCKET_BASE-50
#define HYPORT_ERROR_SOCKET_EACCES   HYPORT_ERROR_SOCKET_BASE-51
#define HYPORT_ERROR_SOCKET_FIRST_ERROR_NUMBER   HYPORT_ERROR_SOCKET_BASE
#define HYPORT_ERROR_SOCKET_LAST_ERROR_NUMBER   HYPORT_ERROR_SOCKET_VALUE_NULL
File Errors
Error codes for file operations.

#define HYPORT_ERROR_FILE_BASE   -300
#define HYPORT_ERROR_FILE_OPFAILED   (HYPORT_ERROR_FILE_BASE)
#define HYPORT_ERROR_FILE_EOF   (HYPORT_ERROR_FILE_BASE-1)
#define HYPORT_ERROR_FILE_NOPERMISSION   (HYPORT_ERROR_FILE_BASE-2)
#define HYPORT_ERROR_FILE_NOTFOUND   (HYPORT_ERROR_FILE_BASE-3)
#define HYPORT_ERROR_FILE_NAMETOOLONG   (HYPORT_ERROR_FILE_BASE-4)
#define HYPORT_ERROR_FILE_DISKFULL   (HYPORT_ERROR_FILE_BASE-5)
#define HYPORT_ERROR_FILE_EXIST   (HYPORT_ERROR_FILE_BASE-6)
#define HYPORT_ERROR_FILE_SYSTEMFULL   (HYPORT_ERROR_FILE_BASE-7)
#define HYPORT_ERROR_FILE_NOENT   (HYPORT_ERROR_FILE_BASE-8)
#define HYPORT_ERROR_FILE_NOTDIR   (HYPORT_ERROR_FILE_BASE-9)
#define HYPORT_ERROR_FILE_LOOP   (HYPORT_ERROR_FILE_BASE-10)
#define HYPORT_ERROR_FILE_BADF   (HYPORT_ERROR_FILE_BASE-11)
#define HYPORT_ERROR_FILE_WOULDBLOCK   (HYPORT_ERROR_FILE_BASE-12)
#define HYPORT_ERROR_FILE_INVAL   (HYPORT_ERROR_FILE_BASE-13)
#define HYPORT_ERROR_FILE_LOCKED   (HYPORT_ERROR_FILE_BASE-14)


Genereated on Tue Dec 9 14:12:59 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.