7 #include <dmlc/thread_local.h> 11 std::string last_error;
14 typedef dmlc::ThreadLocalStore<TreeliteAPIErrorEntry> TreeliteAPIErrorStore;
17 return TreeliteAPIErrorStore::Get()->last_error.c_str();
21 TreeliteAPIErrorStore::Get()->last_error = msg;
const char * TreeliteGetLastError()
display last error; can be called by multiple threads Note. Each thread will get the last error occur...
Error handling for C API.
void TreeliteAPISetLastError(const char *msg)
Set the last error message needed by C API.