7 #ifndef TREELITE_C_API_C_API_ERROR_H_ 8 #define TREELITE_C_API_C_API_ERROR_H_ 10 #include <dmlc/base.h> 11 #include <dmlc/logging.h> 15 #define API_BEGIN() try { 19 } catch(dmlc::Error &_except_) { \ 20 return TreeliteAPIHandleException(_except_); \ 28 #define API_END_HANDLE_ERROR(Finalize) \ 29 } catch(dmlc::Error &_except_) { \ 31 return TreeliteAPIHandleException(_except_); \ 49 #endif // TREELITE_C_API_C_API_ERROR_H_ void TreeliteAPISetLastError(const char *msg)
Set the last error message needed by C API.
int TreeliteAPIHandleException(const dmlc::Error &e)
handle exception thrown out
C API of treelite, used for interfacing with other languages This header is used by both the runtime ...