mika-fischer opened a new issue #13956: C API should *never* call abort()
URL: https://github.com/apache/incubator-mxnet/issues/13956
 
 
   ## Description
   C-API functions should catch and report *all* errors instead of calling 
`abort()` for some errors.
   
   ## Environment info (Required)
   
   This is independent of the environment and the problem is present in all 
releases and the master branch.
   
   ## Minimum reproducible example
   
   Basically all uses of the `CHECK...` macros in functions called (even 
indirectly) from any of the C-API functions are problematic since in case they 
fail the error cannot be caught by the library user and mxnet just aborts the 
whole process (via `dmlc::LogMessageFatal`). This is unacceptable for any 
library…
   
   It might be infeasible to achieve this library-wide. But at least simple 
user-input errors in `src/c_api` should most definitely not use `CHECK_...` for 
anything.
   
   One example:
   
https://github.com/apache/incubator-mxnet/blob/eebdd5f644e953da76ac35a898992ef5c83d3f30/src/c_api/c_predict_api.cc#L130
   
   This should not call abort(), but throw a normal exception so that the 
library user can handle the error appropriately...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to