snopt / snopt-matlab

Matlab interface for sparse nonlinear optimizer SNOPT
MIT License
55 stars 23 forks source link

Handle Matlab force-quit or unexpected errors #3

Closed gnowzil closed 7 years ago

gnowzil commented 8 years ago

Force-quit by user or an unexpected error during the middle of a run can cause Matlab to crash. Need to replace mexErrMsgTxt with mexErrMsgIdAndTxt, and use mexAtExit to handle unexpected exits.

gnowzil commented 7 years ago

mexErrMsgIdAndTxt and mexAtExit added with v2.2.0. Don't think it's possible to really catch a force-quit in the middle of a mexfile run. Close this for now.