throw dmlc::Error (#120)

* throw dmlc::Error handled by xgboost jni
This commit is contained in:
Chen Qin 2019-10-16 10:12:15 -07:00 committed by Jiaming Yuan
parent 33dbc10aab
commit d22e0809a8
2 changed files with 3 additions and 6 deletions

View File

@ -13,6 +13,7 @@
#include <cstdlib>
#include <stdexcept>
#include <vector>
#include "dmlc/io.h"
#ifndef RABIT_STRICT_CXX98_
#include <cstdarg>
@ -92,7 +93,7 @@ inline void HandleAssertError(const char *msg) {
exit(-1);
} else {
fprintf(stderr, "AssertError:%s, rabit is configured to keep process running\n", msg);
throw std::runtime_error(msg);
throw dmlc::Error(msg);
}
}
/*!
@ -105,7 +106,7 @@ inline void HandleCheckError(const char *msg) {
exit(-1);
} else {
fprintf(stderr, "%s, rabit is configured to keep process running\n", msg);
throw std::runtime_error(msg);
throw dmlc::Error(msg);
}
}
inline void HandlePrint(const char *msg) {

View File

@ -10,10 +10,6 @@
#include <string>
#include "rabit/internal/utils.h"
#ifndef DMLC_IO_H_
#include "dmlc/io.h"
#endif // DMLC_IO_H_
namespace rabit {
/*!
* \brief defines stream used in rabit