Skip to content

Commit

Permalink
Fix error reporting for dmlc::Error
Browse files Browse the repository at this point in the history
  • Loading branch information
jroesch committed Jan 23, 2019
1 parent fa8397d commit 4e32721
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/relay/pass/type_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,11 @@ bool TypeSolver::Solve() {
rnode->resolved = false;
} catch (const dmlc::Error& err) {
rnode->resolved = false;
std::cout << err.what() << std::endl;
exit(1);
this->ReportError(
RELAY_ERROR(
"an internal invariant was violdated while" \
"typechecking your program" <<
err.what()), rnode->location);
}

// Mark inqueue as false after the function call
Expand Down

0 comments on commit 4e32721

Please sign in to comment.