UP | HOME

Error handling

Table of Contents

The library should never make the calling programs abort, nor perform any input/output operations. This decision has to be taken by the developer of the code calling the library.

All the functions return with an exit code, defined as

typedef int32_t qmckl_exit_code;

The exit code returns the completion status of the function to the calling program. When a function call completed successfully, QMCKL_SUCCESS is returned. If one of the functions of the library fails to complete the requested task, an appropriate error code is returned to the program.

Here is the complete list of exit codes.

QMCKL_SUCCESS 0
QMCKL_INVALID_ARG_1 1
QMCKL_INVALID_ARG_2 2
QMCKL_INVALID_ARG_3 3
QMCKL_INVALID_ARG_4 4
QMCKL_INVALID_ARG_5 5
QMCKL_INVALID_ARG_6 6
QMCKL_INVALID_ARG_7 7
QMCKL_INVALID_ARG_8 8
QMCKL_INVALID_ARG_9 9
QMCKL_INVALID_ARG_10 10
QMCKL_FAILURE 101
QMCKL_ERRNO 102
QMCKL_INVALID_CONTEXT 103
QMCKL_ALLOCATION_FAILED 104
QMCKL_DEALLOCATION_FAILED 105
QMCKL_INVALID_EXIT_CODE 106

Author: TREX CoE

Created: 2021-03-19 Fri 12:49

Validate