Typedefs | |
typedef int | mrpc_status_t |
Error code returned by protocol operations. | |
Enumerations | |
enum | mrpc_status_codes { MINIRPC_OK = 0, MINIRPC_PENDING = -1, MINIRPC_ENCODING_ERR = -2, MINIRPC_PROCEDURE_UNAVAIL = -3, MINIRPC_INVALID_ARGUMENT = -4, MINIRPC_INVALID_PROTOCOL = -5, MINIRPC_NETWORK_FAILURE = -6 } |
Error codes defined by miniRPC. More... | |
Functions | |
const char * | mrpc_strerror (mrpc_status_t status) |
Return a brief description of the specified miniRPC error code. |
miniRPC functions return two distinct classes of error codes. Most protocol-independent functions return an int: 0 for success, or a positive POSIX error code (e.g. EINVAL) on error. Most protocol-dependent functions return an mrpc_status_t, which is defined as follows:
enum mrpc_status_codes |
Error codes defined by miniRPC.
MINIRPC_OK | Success | |
MINIRPC_PENDING | Special return code used by request handlers to indicate that they will complete the request asynchronously | |
MINIRPC_ENCODING_ERR | An error occurred during serialization/deserialization | |
MINIRPC_PROCEDURE_UNAVAIL | The requested procedure is not available at this time | |
MINIRPC_INVALID_ARGUMENT | An invalid argument was provided | |
MINIRPC_INVALID_PROTOCOL | The implied protocol role does not match the connection | |
MINIRPC_NETWORK_FAILURE | The action could not be completed due to a temporary or permanent network problem |
const char* mrpc_strerror | ( | mrpc_status_t | status | ) |
Return a brief description of the specified miniRPC error code.
status | The error code |
The returned string must not be modified or freed by the application. This function only understands the error codes defined in enum mrpc_status_codes; application-specific error codes will be mapped to a generic description.