mc2-project / secure-xgboost

Secure collaborative training and inference for XGBoost.
https://mc2-project.github.io/secure-xgboost/
Apache License 2.0
105 stars 32 forks source link

More descriptive MbedTLS error messages #153

Open chester-leung opened 3 years ago

chester-leung commented 3 years ago

Currently, all mbed TLS errors are outputted by LOG(FATAL), with the return code. We can use the following code to map the return code to an error message, and log the more descriptive error message.

char error_buf[200];
mbedtls_strerror( ret, error_buf, 200 );
LOG(FATAL) << error_buf;