25 #ifndef MXNET_C_API_ERROR_H_ 26 #define MXNET_C_API_ERROR_H_ 34 #define MX_API_BEGIN() \ 36 on_enter_api(__FUNCTION__); 37 #define MX_API_END() \ 39 catch (const std::exception &_except_) { \ 41 return MXAPIHandleException(_except_); \ 44 return 0; // NOLINT(*) 45 #define MX_API_END_HANDLE_ERROR(Finalize) \ 47 catch (const std::exception &_except_) { \ 50 return MXAPIHandleException(_except_); \ 53 return 0; // NOLINT(*) 73 #endif // MXNET_C_API_ERROR_H_ namespace of mxnet
Definition: base.h:89
void on_enter_api(const char *function)
void MXAPISetLastError(const char *msg)
Set the last error message needed by C API.
int MXAPIHandleException(const std::exception &e)
handle exception throwed out
Definition: c_api_error.h:64