-
Notifications
You must be signed in to change notification settings - Fork 543
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
Adding error messages for debug purposes #346
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ícaro Dantas de Araújo Lima <icaro.lima@ccc.ufcg.edu.br>
Signed-off-by: Ícaro Dantas de Araújo Lima <icaro.lima@ccc.ufcg.edu.br>
Signed-off-by: Ícaro Dantas de Araújo Lima <icaro.lima@ccc.ufcg.edu.br>
Signed-off-by: Ícaro Dantas de Araújo Lima <icaro.lima@ccc.ufcg.edu.br>
Signed-off-by: Ícaro Dantas de Araújo Lima <icaro.lima@ccc.ufcg.edu.br>
Signed-off-by: Ícaro Dantas de Araújo Lima <icaro.lima@ccc.ufcg.edu.br>
I'm wondering if I should change the word "error" to "status". On the other hand, "SGX_SUCCESS" is in the file "sgx_error.h", even indicating success. |
This patch is unlikely to be accepted since it is not clearly stating which problem to solve. If it is just to convert an error code to a string, then it doesn't seem provide much value. |
I disagree, debug messages are one of the major reason for extensive code at least in the ones I write and in the sample codes from this repository. I'll edit the merge request message to make it clearer. |
I also think that this is useful. I did something similar and then went and looked at PRs and saw this. I think its important to have some function like this or the one I added (which is admittedly very basic). But some way of quickly doing an error code -> string of the message or string of the description. Preferably both |
My intention with this patch is to map error codes to friendlier error messages, just as they are in the current sgx documentation ( e.g. here) It is worth remembering that the error message will depend on the function that throws the error and the error code.
Currently, for most samples (here), you have put a list of errors in each app.cpp, taking much of the code and complicating it unnecessarily.
Some examples where something similar has been implemented:
...