C API provides exception handling, here are all possible return values of the functions:
There are two main types of possible issues:
- parameter checking issue: return value is -14, check the input parameters
- C++ call exception issue: if C++ called by C interface throw exception, C interface will catch the exception but no throw to C user, just returns the status value, without a detailed message. If you want details, can print it in exception macro.