26 #ifndef MXNET_C_API_ERROR_H_ 27 #define MXNET_C_API_ERROR_H_ 35 #define MX_API_BEGIN() \ 37 on_enter_api(__FUNCTION__); 38 #define MX_API_END() \ 40 catch (const std::exception &_except_) { \ 42 return MXAPIHandleException(_except_); \ 45 return 0; // NOLINT(*) 46 #define MX_API_END_HANDLE_ERROR(Finalize) \ 48 catch (const std::exception &_except_) { \ 51 return MXAPIHandleException(_except_); \ 54 return 0; // NOLINT(*) 72 #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