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

Change safe APIs to return mssf Error #131

Conversation

youyuanwu
Copy link
Collaborator

@youyuanwu youyuanwu commented Jan 22, 2025

mssf Error can be converted to ErrorCode enum easily and user app can check the enum to determine why API failed.
Raw api returns windows_core::Error and typically user converts to mssf Error all the time after mssf API call. This PR changes the return time of all safe APIs to mssf Error so it is easy to handle failures, and it displays human readable messages.
Renamed FabricError to Error and this is the mssf Error we will use. Renamed FabricErrorCode to ErrorCode since it is clear.

One part of this change that requires careful review is the Bridge layer code where the ctx from Begin and End functions are not type checked but casted. I checked them manually.

@youyuanwu youyuanwu marked this pull request as ready for review January 22, 2025 23:39
@youyuanwu youyuanwu merged commit 1a0fa3f into Azure:main Jan 24, 2025
4 checks passed
@youyuanwu youyuanwu deleted the users/youyuanwu/change-safe-api-to-use-mssf-Error branch January 24, 2025 01:08
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.

2 participants