Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Updating exception handling to catch dmlc::error.
Browse files Browse the repository at this point in the history
  • Loading branch information
leleamol committed Mar 26, 2019
1 parent c04bf12 commit 570398d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpp-package/example/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ using namespace mxnet::cpp;
#define TRY \
try {
#define CATCH \
} catch(...) { \
} catch(dmlc::Error &err) { \
LG << "Status: FAIL";\
LG << "With Error: " << MXGetLastError(); \
return 1; \
} catch(...) { \
LG << "Status: FAIL";\
return 1; \
}

bool isFileExists(const std::string &filename) {
Expand Down

0 comments on commit 570398d

Please sign in to comment.