[Ipopt-tickets] [Ipopt] #244: throw exception instead of using exit() in HSLLoader.c

Ipopt coin-trac at coin-or.org
Thu Aug 28 10:11:53 EDT 2014


#244: throw exception instead of using exit() in HSLLoader.c
------------------------+------------------------
Reporter:  ghorn        |      Owner:  ipopt-team
    Type:  enhancement  |     Status:  new
Priority:  normal       |  Component:  Ipopt
 Version:  trunk        |   Severity:  normal
Keywords:               |
------------------------+------------------------
 I found this in the debian packaging lint, for example:

 {{{
 void F77_FUNC(ma27ad,MA27AD)(ipfint *N, ipfint *NZ, const ipfint *IRN,
 const ipfint* ICN,
                              ipfint *IW, ipfint* LIW, ipfint* IKEEP,
 ipfint *IW1,
                              ipfint* NSTEPS, ipfint* IFLAG, ipfint* ICNTL,
                              double* CNTL, ipfint *INFO, double* OPS) {
   if (func_ma27ad==NULL) LSL_lateHSLLoad();
   if (func_ma27ad==NULL) {
     fprintf(stderr, "HSL routine MA27AD not found in " HSLLIBNAME
 ".\nAbort...\n");
     exit(EXIT_FAILURE);
   }
   func_ma27ad(N, NZ, IRN, ICN, IW, LIW, IKEEP, IW1, NSTEPS, IFLAG, ICNTL,
 CNTL, INFO, OPS);
 }
 }}}

 Since this is C code, the error would have to be passed to C++ for raising
 an exception.

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



More information about the Ipopt-tickets mailing list