27 #ifndef MXNET_C_API_ERROR_H_ 28 #define MXNET_C_API_ERROR_H_ 36 #define MX_API_BEGIN() \ 38 on_enter_api(__FUNCTION__); 39 #define MX_API_END() \ 41 catch (const std::exception &_except_) { \ 43 return MXAPIHandleException(_except_); \ 46 return 0; // NOLINT(*) 47 #define MX_API_END_HANDLE_ERROR(Finalize) \ 49 catch (const std::exception &_except_) { \ 52 return MXAPIHandleException(_except_); \ 55 return 0; // NOLINT(*) 73 #endif // MXNET_C_API_ERROR_H_ namespace of mxnet
Definition: api_registry.h:33
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