gwenhywfar  5.11.1beta
Macros
error.h File Reference
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/types.h>

Go to the source code of this file.

Macros

#define GWEN_ERROR_ABORTED   (-2)
 
#define GWEN_ERROR_ALREADY_REGISTERED   (-58)
 
#define GWEN_ERROR_BAD_ADDRESS   (-41)
 
#define GWEN_ERROR_BAD_ADDRESS_FAMILY   (-48)
 
#define GWEN_ERROR_BAD_DATA   (-101)
 
#define GWEN_ERROR_BAD_NAME   (-69)
 
#define GWEN_ERROR_BAD_PIN   (-70)
 
#define GWEN_ERROR_BAD_PIN_0_LEFT   (-71)
 
#define GWEN_ERROR_BAD_PIN_1_LEFT   (-72)
 
#define GWEN_ERROR_BAD_PIN_2_LEFT   (-73)
 
#define GWEN_ERROR_BAD_SIZE   (-60)
 
#define GWEN_ERROR_BAD_SOCKETTYPE   (-32)
 
#define GWEN_ERROR_BROKEN_PIPE   (-39)
 
#define GWEN_ERROR_BUFFER_OVERFLOW   (-42)
 
#define GWEN_ERROR_CLOSE   (-54)
 
#define GWEN_ERROR_CONN_REFUSED   (-106)
 
#define GWEN_ERROR_COULD_NOT_LOAD   (-49)
 
#define GWEN_ERROR_COULD_NOT_RESOLVE   (-50)
 
#define GWEN_ERROR_DECRYPT   (-63)
 
#define GWEN_ERROR_DEFAULT_VALUE   (-76)
 
#define GWEN_ERROR_ENCRYPT   (-62)
 
#define GWEN_ERROR_EOF   (-57)
 
#define GWEN_ERROR_FOUND   (-102)
 
#define GWEN_ERROR_GENERIC   (-1)
 
#define GWEN_ERROR_HOST_NOT_FOUND   (-43)
 
#define GWEN_ERROR_IN_PROGRESS   (-35)
 
#define GWEN_ERROR_INTERNAL   (-104)
 
#define GWEN_ERROR_INTERRUPTED   (-37)
 
#define GWEN_ERROR_INVALID   (-6)
 
#define GWEN_ERROR_IO   (-103)
 
#define GWEN_ERROR_LOCK   (-109)
 
#define GWEN_ERROR_MEMORY_FULL   (-40)
 
#define GWEN_ERROR_NET_UNREACHABLE   (-107)
 
#define GWEN_ERROR_NO_ADDRESS   (-44)
 
#define GWEN_ERROR_NO_DATA   (-55)
 
#define GWEN_ERROR_NO_KEY   (-74)
 
#define GWEN_ERROR_NO_RECOVERY   (-45)
 
#define GWEN_ERROR_NOT_AVAILABLE   (-3)
 
#define GWEN_ERROR_NOT_CONNECTED   (-100)
 
#define GWEN_ERROR_NOT_FOUND   (-51)
 
#define GWEN_ERROR_NOT_IMPLEMENTED   (-67)
 
#define GWEN_ERROR_NOT_OPEN   (-33)
 
#define GWEN_ERROR_NOT_REGISTERED   (-59)
 
#define GWEN_ERROR_NOT_SUPPORTED   (-68)
 
#define GWEN_ERROR_OPEN   (-5)
 
#define GWEN_ERROR_PARTIAL   (-56)
 
#define GWEN_ERROR_PERMISSIONS   (-105)
 
#define GWEN_ERROR_READ   (-52)
 
#define GWEN_ERROR_REMOVED   (-75)
 
#define GWEN_ERROR_SIGN   (-64)
 
#define GWEN_ERROR_SSL   (-66)
 
#define GWEN_ERROR_SSL_PREMATURE_CLOSE   (-110)
 
#define GWEN_ERROR_SSL_SECURITY   (-108)
 
#define GWEN_ERROR_STARTUP   (-36)
 
#define GWEN_ERROR_TIMEOUT   (-34)
 
#define GWEN_ERROR_TRY_AGAIN   (-46)
 
#define GWEN_ERROR_UNKNOWN_DNS_ERROR   (-47)
 
#define GWEN_ERROR_USER_ABORTED   (-4)
 
#define GWEN_ERROR_USEROFFSET   (-1000)
 
#define GWEN_ERROR_VERIFY   (-65)
 
#define GWEN_ERROR_WRITE   (-53)
 
#define GWEN_SUCCESS   0
 

Functions

Verbosity

Composing error messages.

GWENHYWFAR_API const char * GWEN_Error_SimpleToString (int i)
 Returns a (very) short string describing the given GWEN error code, or "Unknown error" for unknown codes. More...
 
GWENHYWFAR_API int GWEN_Error_ToString (int c, char *buffer, int bsize)
 

Macro Definition Documentation

◆ GWEN_ERROR_ABORTED

#define GWEN_ERROR_ABORTED   (-2)

Definition at line 63 of file error.h.

◆ GWEN_ERROR_ALREADY_REGISTERED

#define GWEN_ERROR_ALREADY_REGISTERED   (-58)

Definition at line 98 of file error.h.

◆ GWEN_ERROR_BAD_ADDRESS

#define GWEN_ERROR_BAD_ADDRESS   (-41)

Definition at line 78 of file error.h.

◆ GWEN_ERROR_BAD_ADDRESS_FAMILY

#define GWEN_ERROR_BAD_ADDRESS_FAMILY   (-48)

Definition at line 85 of file error.h.

◆ GWEN_ERROR_BAD_DATA

#define GWEN_ERROR_BAD_DATA   (-101)

Definition at line 121 of file error.h.

◆ GWEN_ERROR_BAD_NAME

#define GWEN_ERROR_BAD_NAME   (-69)

Definition at line 110 of file error.h.

◆ GWEN_ERROR_BAD_PIN

#define GWEN_ERROR_BAD_PIN   (-70)

Definition at line 111 of file error.h.

◆ GWEN_ERROR_BAD_PIN_0_LEFT

#define GWEN_ERROR_BAD_PIN_0_LEFT   (-71)

Definition at line 112 of file error.h.

◆ GWEN_ERROR_BAD_PIN_1_LEFT

#define GWEN_ERROR_BAD_PIN_1_LEFT   (-72)

Definition at line 113 of file error.h.

◆ GWEN_ERROR_BAD_PIN_2_LEFT

#define GWEN_ERROR_BAD_PIN_2_LEFT   (-73)

Definition at line 114 of file error.h.

◆ GWEN_ERROR_BAD_SIZE

#define GWEN_ERROR_BAD_SIZE   (-60)

Definition at line 100 of file error.h.

◆ GWEN_ERROR_BAD_SOCKETTYPE

#define GWEN_ERROR_BAD_SOCKETTYPE   (-32)

Definition at line 69 of file error.h.

◆ GWEN_ERROR_BROKEN_PIPE

#define GWEN_ERROR_BROKEN_PIPE   (-39)

Definition at line 75 of file error.h.

◆ GWEN_ERROR_BUFFER_OVERFLOW

#define GWEN_ERROR_BUFFER_OVERFLOW   (-42)

Definition at line 79 of file error.h.

◆ GWEN_ERROR_CLOSE

#define GWEN_ERROR_CLOSE   (-54)

Definition at line 93 of file error.h.

◆ GWEN_ERROR_CONN_REFUSED

#define GWEN_ERROR_CONN_REFUSED   (-106)

Definition at line 127 of file error.h.

◆ GWEN_ERROR_COULD_NOT_LOAD

#define GWEN_ERROR_COULD_NOT_LOAD   (-49)

Definition at line 87 of file error.h.

◆ GWEN_ERROR_COULD_NOT_RESOLVE

#define GWEN_ERROR_COULD_NOT_RESOLVE   (-50)

Definition at line 88 of file error.h.

◆ GWEN_ERROR_DECRYPT

#define GWEN_ERROR_DECRYPT   (-63)

Definition at line 102 of file error.h.

◆ GWEN_ERROR_DEFAULT_VALUE

#define GWEN_ERROR_DEFAULT_VALUE   (-76)

Definition at line 117 of file error.h.

◆ GWEN_ERROR_ENCRYPT

#define GWEN_ERROR_ENCRYPT   (-62)

Definition at line 101 of file error.h.

◆ GWEN_ERROR_EOF

#define GWEN_ERROR_EOF   (-57)

Definition at line 96 of file error.h.

◆ GWEN_ERROR_FOUND

#define GWEN_ERROR_FOUND   (-102)

Definition at line 122 of file error.h.

◆ GWEN_ERROR_GENERIC

#define GWEN_ERROR_GENERIC   (-1)

Definition at line 62 of file error.h.

◆ GWEN_ERROR_HOST_NOT_FOUND

#define GWEN_ERROR_HOST_NOT_FOUND   (-43)

Definition at line 80 of file error.h.

◆ GWEN_ERROR_IN_PROGRESS

#define GWEN_ERROR_IN_PROGRESS   (-35)

Definition at line 72 of file error.h.

◆ GWEN_ERROR_INTERNAL

#define GWEN_ERROR_INTERNAL   (-104)

Definition at line 125 of file error.h.

◆ GWEN_ERROR_INTERRUPTED

#define GWEN_ERROR_INTERRUPTED   (-37)

Definition at line 74 of file error.h.

◆ GWEN_ERROR_INVALID

#define GWEN_ERROR_INVALID   (-6)

Definition at line 67 of file error.h.

◆ GWEN_ERROR_IO

#define GWEN_ERROR_IO   (-103)

Definition at line 123 of file error.h.

◆ GWEN_ERROR_LOCK

#define GWEN_ERROR_LOCK   (-109)

Definition at line 131 of file error.h.

◆ GWEN_ERROR_MEMORY_FULL

#define GWEN_ERROR_MEMORY_FULL   (-40)

Definition at line 77 of file error.h.

◆ GWEN_ERROR_NET_UNREACHABLE

#define GWEN_ERROR_NET_UNREACHABLE   (-107)

Definition at line 128 of file error.h.

◆ GWEN_ERROR_NO_ADDRESS

#define GWEN_ERROR_NO_ADDRESS   (-44)

Definition at line 81 of file error.h.

◆ GWEN_ERROR_NO_DATA

#define GWEN_ERROR_NO_DATA   (-55)

Definition at line 94 of file error.h.

◆ GWEN_ERROR_NO_KEY

#define GWEN_ERROR_NO_KEY   (-74)

Definition at line 115 of file error.h.

◆ GWEN_ERROR_NO_RECOVERY

#define GWEN_ERROR_NO_RECOVERY   (-45)

Definition at line 82 of file error.h.

◆ GWEN_ERROR_NOT_AVAILABLE

#define GWEN_ERROR_NOT_AVAILABLE   (-3)

Definition at line 64 of file error.h.

◆ GWEN_ERROR_NOT_CONNECTED

#define GWEN_ERROR_NOT_CONNECTED   (-100)

Definition at line 120 of file error.h.

◆ GWEN_ERROR_NOT_FOUND

#define GWEN_ERROR_NOT_FOUND   (-51)

Definition at line 89 of file error.h.

◆ GWEN_ERROR_NOT_IMPLEMENTED

#define GWEN_ERROR_NOT_IMPLEMENTED   (-67)

Definition at line 108 of file error.h.

◆ GWEN_ERROR_NOT_OPEN

#define GWEN_ERROR_NOT_OPEN   (-33)

Definition at line 70 of file error.h.

◆ GWEN_ERROR_NOT_REGISTERED

#define GWEN_ERROR_NOT_REGISTERED   (-59)

Definition at line 99 of file error.h.

◆ GWEN_ERROR_NOT_SUPPORTED

#define GWEN_ERROR_NOT_SUPPORTED   (-68)

Definition at line 109 of file error.h.

◆ GWEN_ERROR_OPEN

#define GWEN_ERROR_OPEN   (-5)

Definition at line 66 of file error.h.

◆ GWEN_ERROR_PARTIAL

#define GWEN_ERROR_PARTIAL   (-56)

Definition at line 95 of file error.h.

◆ GWEN_ERROR_PERMISSIONS

#define GWEN_ERROR_PERMISSIONS   (-105)

Definition at line 126 of file error.h.

◆ GWEN_ERROR_READ

#define GWEN_ERROR_READ   (-52)

Definition at line 91 of file error.h.

◆ GWEN_ERROR_REMOVED

#define GWEN_ERROR_REMOVED   (-75)

Definition at line 116 of file error.h.

◆ GWEN_ERROR_SIGN

#define GWEN_ERROR_SIGN   (-64)

Definition at line 103 of file error.h.

◆ GWEN_ERROR_SSL

#define GWEN_ERROR_SSL   (-66)

Definition at line 105 of file error.h.

◆ GWEN_ERROR_SSL_PREMATURE_CLOSE

#define GWEN_ERROR_SSL_PREMATURE_CLOSE   (-110)

Definition at line 133 of file error.h.

◆ GWEN_ERROR_SSL_SECURITY

#define GWEN_ERROR_SSL_SECURITY   (-108)

Definition at line 129 of file error.h.

◆ GWEN_ERROR_STARTUP

#define GWEN_ERROR_STARTUP   (-36)

Definition at line 73 of file error.h.

◆ GWEN_ERROR_TIMEOUT

#define GWEN_ERROR_TIMEOUT   (-34)

Definition at line 71 of file error.h.

◆ GWEN_ERROR_TRY_AGAIN

#define GWEN_ERROR_TRY_AGAIN   (-46)

Definition at line 83 of file error.h.

◆ GWEN_ERROR_UNKNOWN_DNS_ERROR

#define GWEN_ERROR_UNKNOWN_DNS_ERROR   (-47)

Definition at line 84 of file error.h.

◆ GWEN_ERROR_USER_ABORTED

#define GWEN_ERROR_USER_ABORTED   (-4)

Definition at line 65 of file error.h.

◆ GWEN_ERROR_USEROFFSET

#define GWEN_ERROR_USEROFFSET   (-1000)

Definition at line 136 of file error.h.

◆ GWEN_ERROR_VERIFY

#define GWEN_ERROR_VERIFY   (-65)

Definition at line 104 of file error.h.

◆ GWEN_ERROR_WRITE

#define GWEN_ERROR_WRITE   (-53)

Definition at line 92 of file error.h.

◆ GWEN_SUCCESS

#define GWEN_SUCCESS   0

Definition at line 60 of file error.h.

Function Documentation

◆ GWEN_Error_SimpleToString()

GWENHYWFAR_API const char* GWEN_Error_SimpleToString ( int  i)

Returns a (very) short string describing the given GWEN error code, or "Unknown error" for unknown codes.

Parameters
iThe error code
Returns
A fixed static string that must not be free'd

◆ GWEN_Error_ToString()

GWENHYWFAR_API int GWEN_Error_ToString ( int  c,
char *  buffer,
int  bsize 
)

Dumps the string corresponding to the given erro code.

Returns
1 detailed error message created, 0 otherwise
Parameters
cerror code
bufferpointer to a buffer to receive the message
bsizesize of that buffer in bytes