-
Notifications
You must be signed in to change notification settings - Fork 273
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
Export RedisError to SWIG wrapper. #820
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ganglyu
previously approved these changes
Sep 15, 2023
liuh-80
changed the title
Add redisreply.h to swsscommon.i for generate SWIG wrapper.
Imporove swss-common exception from text and runtime_error to RedisError.
Nov 27, 2023
liuh-80
changed the title
Imporove swss-common exception from text and runtime_error to RedisError.
Improve swss-common exception from text and runtime_error to RedisError.
Nov 28, 2023
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
No pipelines are associated with this pull request. |
qiluo-msft
reviewed
Jan 9, 2024
common/consumertable.cpp
Outdated
@@ -90,7 +90,7 @@ void ConsumerTable::pops(deque<KeyOpFieldsValuesTuple> &vkco, const string &pref | |||
if (i+1 >= ctx->elements) | |||
{ | |||
SWSS_LOG_ERROR("invalid number of elements in returned table: %zu >= %zu", i+1, ctx->elements); | |||
throw runtime_error("invalid number of elements in returned table"); | |||
throw RedisError("invalid number of elements in returned table"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, revert to first commit to only export RedisError class.
liuh-80
force-pushed
the
dev/liuh/export-redisreply
branch
from
January 9, 2024 02:15
70359a3
to
54c6839
Compare
liuh-80
changed the title
Improve swss-common exception from text and runtime_error to RedisError.
Export RedisError to SWIG wrapper.
Jan 9, 2024
qiluo-msft
approved these changes
Jan 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
RedisError class and other class defined in redisreply.h can't be used in python.
This is bcause redisreply.h nor gnerate SWIG wrapper.
How I did it
Add redisreply.h to swsscommon.i for generate SWIG wrapper.
How to verify it
Pass all UT and E2E test cases.
Manually check the classes in redisreply.h exist in SWIG wrapper.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Add redisreply.h to swsscommon.i for generate SWIG wrapper.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)