Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C API Exceptions #967

Merged
merged 4 commits into from
Jan 16, 2025
Merged

C API Exceptions #967

merged 4 commits into from
Jan 16, 2025

Conversation

erer1243
Copy link
Contributor

@erer1243 erer1243 commented Jan 13, 2025

The existing C API has no mechanism for passing exceptions over the FFI border. This PR changes C API functions to return a result type indicating whether an exception occurred. Previous return values now are output via pointer arguments.

Currently this just implements the changes for DBConnector, as an easier to review demo. However, the complete change is already finished locally. I can update this PR to contain the whole change when ready.

closes #932

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

liuh-80
liuh-80 previously approved these changes Jan 15, 2025
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@erer1243 erer1243 merged commit 5a4b4a5 into sonic-net:master Jan 16, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decide how to pass exceptions across the C API
3 participants