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