Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Unified Result Code Exception Handling #74

Open
AddressXception opened this issue Jan 27, 2020 · 0 comments
Open

Unified Result Code Exception Handling #74

AddressXception opened this issue Jan 27, 2020 · 0 comments
Labels
question Further information is requested
Milestone

Comments

@AddressXception
Copy link
Contributor

AddressXception commented Jan 27, 2020

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.

@AddressXception AddressXception added this to the Phase 4 milestone Jan 27, 2020
@AddressXception AddressXception added the question Further information is requested label Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant