Treelite
|
Error handling for C API. More...
Go to the source code of this file.
Macros | |
#define | API_BEGIN() try { |
macro to guard beginning and end section of all functions | |
#define | API_END() |
every function starts with API_BEGIN(); and finishes with API_END() or API_END_HANDLE_ERROR More... | |
#define | API_END_HANDLE_ERROR(Finalize) |
every function starts with API_BEGIN(); and finishes with API_END() or API_END_HANDLE_ERROR() "Finalize" contains procedure to cleanup states when an error happens More... | |
Functions | |
void | TreeliteAPISetLastError (const char *msg) |
Set the last error message needed by C API. More... | |
int | TreeliteAPIHandleException (const std::exception &e) |
handle exception thrown out More... | |
#define API_END | ( | ) |
every function starts with API_BEGIN(); and finishes with API_END() or API_END_HANDLE_ERROR
Definition at line 17 of file c_api_error.h.
#define API_END_HANDLE_ERROR | ( | Finalize | ) |
every function starts with API_BEGIN(); and finishes with API_END() or API_END_HANDLE_ERROR() "Finalize" contains procedure to cleanup states when an error happens
Definition at line 27 of file c_api_error.h.
|
inline |
handle exception thrown out
e | the exception |
Definition at line 44 of file c_api_error.h.
void TreeliteAPISetLastError | ( | const char * | msg | ) |
Set the last error message needed by C API.
msg | The error message to set. |
Definition at line 21 of file c_api_error.cc.