Opened 5 years ago

Closed 3 months ago

#244 closed enhancement (migrated)

throw exception instead of using exit() in HSLLoader.c

Reported by: ghorn Owned by: ipopt-team
Priority: normal Component: Ipopt
Version: trunk Severity: normal
Keywords: Cc:

Description

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.

Change History (1)

comment:1 Changed 3 months ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be followed up there: https://github.com/coin-or/Ipopt/issues/244

Note: See TracTickets for help on using tickets.