25 #ifndef MXNET_C_API_ERROR_H_ 26 #define MXNET_C_API_ERROR_H_ 34 #define MX_API_BEGIN() try { on_enter_api(__FUNCTION__); 35 #define MX_API_END() } catch(dmlc::Error &_except_) { on_exit_api(); return MXAPIHandleException(_except_); } on_exit_api(); return 0; // NOLINT(*) 36 #define MX_API_END_HANDLE_ERROR(Finalize) } catch(dmlc::Error &_except_) { Finalize; on_exit_api(); return MXAPIHandleException(_except_); } on_exit_api(); return 0; // NOLINT(*) 56 #endif // MXNET_C_API_ERROR_H_ int MXAPIHandleException(const dmlc::Error &e)
handle exception throwed out
Definition: c_api_error.h:47
namespace of mxnet
Definition: base.h:118
void on_enter_api(const char *function)
void MXAPISetLastError(const char *msg)
Set the last error message needed by C API.