Closed craftit closed 7 years ago
Looks like this issue has been already addressed by another pull request.
Yes, #70 is more general, which applies to all assertions.
I was thinking about this, but I wasn't sure if all assertions set error messages.
The macro family CHECK_XX
will create a LogMessageFatal object, which will deconstruct eventually, and output error details as in https://github.com/dmlc/MXNet.cpp/pull/70/files#diff-d13a5bb89e95fd985ad119fb058df68aR219
But that doesn't set the value MXGetLastError() returns.
The InferShape error can be report by #70 , @craftit . I think InferShape is just the reason that I, and you, submitted the PRs, since InferShape failure is common and the details is very important for debug.
@mz24cn, Yes I was thinking about doing a similar change to you but I didn't think all the CHECK_XX's were related to errors set by exceptions so I went for the conservative approach. It is probably better though, as I don't think it will do any harm and should give meaningful errors in more places.
Print out exception error messages to make it easier to find out why these calls failed.