Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw dmlc::Error #120

Merged
merged 4 commits into from Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/rabit/internal/utils.h
Expand Up @@ -13,6 +13,7 @@
#include <cstdlib>
#include <stdexcept>
#include <vector>
#include "dmlc/io.h"

#ifndef RABIT_STRICT_CXX98_
#include <cstdarg>
Expand Down Expand Up @@ -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);
}
}
/*!
Expand All @@ -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) {
Expand Down
4 changes: 0 additions & 4 deletions include/rabit/serializable.h
Expand Up @@ -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
Expand Down