Opened 8 years ago

Closed 3 years ago

#109 closed defect (migrated)

OsiSolverInterface::addRow() throws unhelpful exception

Reported by: gidden Owned by: mjs
Priority: major Milestone:
Component: Osi Base Class Version: 0.104
Keywords: Cc:


Code snippet: Code snippet:

  OsiSolverInterface* si = new OsiClpSolverInterface();
  CoinPackedVector row1;
  row1.setElement(0, 1.0); // x                                                                                                                       
  row1.setElement(1, 1.0); // y                                                                                                                       
  si->addRow(row1, 'G', 1.0, 0.0);
  delete si;

Results in the following: unknown file: Failure Unknown C++ exception thrown in the test body.

Change History (2)

comment:1 Changed 8 years ago by gidden

I'll note this was because I used the setElement member function rather than insert. I should have read the documentation more carefully, however, I think two things would be great in order to close this ticket:

  • if possible, identify the throw and add a message
  • add an @throws directive in the doxygen documentation

comment:2 Changed 3 years ago by stefan

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

This ticket has been migrated to GitHub and will be resolved there:

Note: See TracTickets for help on using tickets.