-
Notifications
You must be signed in to change notification settings - Fork 13
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
Improve error handling to distinguishes errors #10
base: master
Are you sure you want to change the base?
Conversation
@@ -21,7 +21,7 @@ run-example: target/tikv-example | |||
RUST_LOG=debug $(cur_makefile_path)/target/tikv-example | |||
|
|||
target/tikv-example: target/debug/libtikv_client.a example/main.cpp | |||
c++ $(cur_makefile_path)/example/main.cpp -o $(cur_makefile_path)/target/tikv-example -std=c++17 -g -I$(cur_makefile_path)/include -L$(cur_makefile_path)/target/debug -ltikv_client -lpthread -ldl -lssl -lcrypto | |||
c++ $(cur_makefile_path)/example/main.cpp -o $(cur_makefile_path)/target/tikv-example -std=c++17 -g -I$(cur_makefile_path)/include -L$(cur_makefile_path)/target/debug -ltikv_client -lpthread -ldl -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include -lssl -lcrypto |
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.
I had to manually link ssl
and lcrypto
libraries so had to change this but will revert it as soon as other changes are approved.
func(); | ||
} catch (const std::exception &e) { | ||
start error_message = e.what(); | ||
int error_code = 0; |
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.
How should we get the error_code
via stl: map
or using string comparison?
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.
We need to define the error_code on rust binding and pass it to the cpp glue.
Signed-off-by: Anish Aggarwal <[email protected]>
Hi @andylokandy, I have withdrawn my application for the program but would still like to get this one completed if it's okay. |
Fixes: #9
Used cxx-binding to throw custom errors.
Signed-off-by: Anish Aggarwal [email protected]