Opened 8 years ago

Closed 7 years ago

#46 closed enhancement (fixed)

Suppress catch(...) clauses

Reported by: davewilk Owned by: pbonami
Priority: major Component: Bonmin
Version: 1.5 Keywords: catch all
Cc:

Description

Would it be possible to add a preprocessor symbol like NO_CATCH_ALL that would suppress all catch(...) clauses in the Bonmin code?

We use Bonmin in a worker thread as part of a Windows GUI system in which the interactive user is able to cancel the optimization. The methods of our callback class derived from Bonmin::TMINLP detect this cancellation and throw a exception, but this exception is being eaten by the catch(...) clauses in the Bonmin code.

Or are we missing some other method of aborting the Bonmin optimization?

Change History (3)

comment:1 Changed 8 years ago by pbonami

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

Dear Dave; I just add the NO_CATCH_ALL in stable/1.5 and trunk. Please let me know if this is OK.

(in linux to cancel the optimization, we use a slightly cleaner option see the signal_handler at top of BonCbc?.cpp)

Best,

Pierre

comment:2 Changed 8 years ago by pbonami

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:3 Changed 7 years ago by pbonami

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.