10. Error Handling#
10.1. Error Codes#
CU_OBJ_SUCCESS(0): Operation completed successfully.CU_OBJ_FAIL(1): Operation failed.
cuObjGet() and cuObjPut() return CU_OBJ_FAIL as the numeric
ssize_t value 1 for invalid arguments detected before I/O submission.
10.2. Return Value Conventions#
Memory management APIs return the
cuObjErr_tenumeration.I/O operations return
ssize_t. Successful operations return the byte count. I/O and callback failures return negative values. Current pre-submission argument validation failures returnCU_OBJ_FAIL.Connection status APIs return boolean values.
Utility functions return pointers or specific types as documented.
10.3. Best Practices#
Callbacks should return a non-negative byte count on success and a negative
value on failure. To trigger retry behavior, return one of the retryable
negative errno values listed in the RDMA Multipathing
section.