networkclient
|
Typedefs | |
typedef enum nr_error_t | nr_error_t |
Functions | |
const char * | nr_strerror (int error) |
void | nr_strerror_printf (const char *fmt,...) |
These definitions and routines manage errors.
typedef enum nr_error_t nr_error_t |
Error codes
The numerical value of these definitions may change from version to version of the library.
enum nr_error_t |
Error codes
The numerical value of these definitions may change from version to version of the library.
const char* nr_strerror | ( | int | error | ) |
Return a printable error message.
This function returns a string describing the last error that occurred. These messages are intended for developers, and are not suitable for display to an end user. The application using this library should instead produce a "summary" message when an error occurs. e.g. "Failed to receive a response", is better than messages produced by this function, which contain text like "invalid response authentication vector". The first is understandable, the second is not.
[in] | error | The error code (can be less than zero) |
References NR_ERR_ATTR_BAD_NAME, NR_ERR_ATTR_INVALID, NR_ERR_ATTR_OVERFLOW, NR_ERR_ATTR_TOO_LARGE, NR_ERR_ATTR_TOO_SMALL, NR_ERR_ATTR_TYPE_UNKNOWN, NR_ERR_ATTR_UNKNOWN, NR_ERR_ATTR_VALUE_MALFORMED, NR_ERR_AUTH_VECTOR_WRONG, NR_ERR_IN_USE, NR_ERR_INTERNAL_FAILURE, NR_ERR_INVALID_ARG, NR_ERR_MSG_AUTH_LEN, NR_ERR_MSG_AUTH_WRONG, NR_ERR_NO_FREE_ID, NR_ERR_NO_MEM, NR_ERR_NO_PACKET_DATA, NR_ERR_PACKET_CODE_UNKNOWN, NR_ERR_PACKET_TOO_LARGE, NR_ERR_PACKET_TOO_SMALL, NR_ERR_PACKET_UNSIGNED, NR_ERR_REQUEST_CODE_INVALID, NR_ERR_REQUEST_REQUIRED, NR_ERR_RESPONSE_CODE_INVALID, NR_ERR_RESPONSE_ID_INVALID, NR_ERR_RESPONSE_SRC_INVALID, NR_ERR_SYSTEM, NR_ERR_TOO_MANY_ATTRS, NR_ERR_UNSUPPORTED, and NR_ERR_VENDOR_UNKNOWN.
Referenced by main().
void nr_strerror_printf | ( | const char * | fmt, |
... | |||
) |
Record a humanly readable error message.
[in] | fmt | The format to use. |
Referenced by nr_rand_bytes(), nr_socket_open(), nr_vp_alloc(), and nr_vp_alloc_raw().