Feature Request / Bug report
Is your feature request related to a problem? Please describe.
Currently each Coordinator maintains it's own list of enum values representing result codes. Additionally, the API_ endpoints return boolean results. The differences in the enum return values of the coodinator api's can lead to unexpected results.
Additionally, use of assert within the library itself can lead to inconsistent behavior on different platforms due to causing an unrecoverable segmentation fault.
Describe the solution you'd like
We should implement an explicit pattern for return values at each level and unify common success and exception scenarios.
The use of assert within library functions should instead be replaced with the unified exception paradigm. Exception cases where assertions currently fail should be reviewed for inconsistent application state and previous changes in the same call stack should be unwound or rolled back.
please refer to the discussion here
Teachability, Documentation, Adoption, Migration Strategy
Consider that exception handling can work across interop boundaries on some platforms but cannot be consistently applied across all target architectures. The Mono Project has a good discussion why this is the case.
Mono suggests that C/C++ exception cases should be wrapped into an out parameter so that consumers can "propagate" the exception case.