[Ipopt-tickets] [Ipopt] #252: C++ exceptions and MATLAB

Ipopt coin-trac at coin-or.org
Wed Dec 17 14:26:26 EST 2014


#252: C++ exceptions and MATLAB
-------------------------------+------------------------
  Reporter:  drosos.kourounis  |      Owner:  ipopt-team
      Type:  defect            |     Status:  new
  Priority:  normal            |  Component:  Ipopt
   Version:  3.11              |   Severity:  normal
Resolution:                    |   Keywords:
-------------------------------+------------------------

Comment (by FabiF1):

 Hi DK,

 If you're using Matlab, I would expect you to have written a mex-file.
 If that is true, wouldn't it be possible to implement a "Try-Catch" that
 would surround the call to ipopt, and if any error "known" or "unknown" is
 caught, then exit properly the mex-file with a:

 {{{
 try{
 }
 catch(...){
 mexprintf('Oupsss... Ipopt mexfile exits!')
 }
 }}}


 You can also improve it by catching specific error and react differently.

 Nonetheless this should enable you not to take down Matlab when a C++
 exception is thrown.

 Cheers,
 Fab

--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/252#comment:2>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list