Opened 7 years ago

Closed 20 months 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:

Description

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 7 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 20 months 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: https://github.com/coin-or/Osi/issues/109

Note: See TracTickets for help on using tickets.