The Short Vector Random Number Generator (SVRNG) library supports error handling via status variables and corresponding set and get functions. NULL pointers are returned for errors when possible. The following table contains the status constants defined in svrng.h:
Macro Name |
Description |
---|---|
SVRNG_STATUS_OK |
No errors |
SVRNG_STATUS_ERROR_BAD_PARAM1 |
Bad parameter #1 |
SVRNG_STATUS_ERROR_BAD_PARAM2 |
Bad parameter #2 |
SVRNG_STATUS_ERROR_BAD_PARAM3 |
Bad parameter #3 |
SVRNG_STATUS_ERROR_BAD_PARAM4 |
Bad parameter #4 |
SVRNG_STATUS_ERROR_BAD_PARAMS |
Bad combination of parameters |
SVRNG_STATUS_ERROR_BAD_ENGINE |
Bad engine (NULL pointer) |
SVRNG_STATUS_ERROR_BAD_DISTR |
Bad distribution (NULL pointer) |
SVRNG_STATUS_ERROR_MEMORY_ALLOC |
Memory allocation failure |
SVRNG_STATUS_ERROR_UNSUPPORTED |
Function or method not supported |