[Ipopt] Catch (...) statements in Ipopt

Stefan Vigerske stefan at math.hu-berlin.de
Sat May 13 08:35:17 EDT 2017


Hi,

you can change the value of rethrow_nonipoptexception_ via 
IpoptApplication::RethrowNonIpoptException():

https://www.coin-or.org/Ipopt/doxygen/classIpopt_1_1IpoptApplication.html#a985d4b2f4b443b7aef8d6e924c49b5ce

Best,
Stefan

On 05/13/2017 12:47 PM, David Wilkinson wrote:
> I have a Bonmin/Ipopt client application that (rightly or wrongly) uses 
> C++ exceptions for flow control in abnormal situations. In some of these 
> situations, the exception is getting caught by catch (...) statements in 
> Ipopt::IpoptApplication. The content in some (but not all) of these 
> catch (...) statements is protected by a variable 
> rethrow_nonipoptexception_, but this variable is hard-wired to be false, 
> and so cannot be used to change behavior without modifying source code.
> 
> Suggestion:
> 
> The content of all occurrences of catch (...) in Ipopt::IpoptApplication 
> should be protected by this rethrow_nonipoptexception_ variable, and 
> its  value should be controllable by a preprocessor symbol.
> 
> There are examples of catch (...) statements in other parts of COIN-OR 
> (Bonmin and Clp) that are not harmful to my client application, but 
> perhaps these should also be protected in a similar manner.
> 
> Thanks,
> 
> David Wilkinson
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_ipopt&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=uUZR1xuZjRHb2iwG1M6a4OZH7EZH4pOHxKw1tfWL5TE&s=_8Ow3ENlrd9SRhRDClaTgphGxyICFFwa7JbRD6uhG6o&e= 
> 


-- 
http://www.gams.com/~stefan


More information about the Ipopt mailing list