I'm a bit puzzled by something in the c++ documentation, where it says that 

If your objective/constraint functions throw any exception during the 
execution of nlopt::opt::optimize, it will be caught by NLopt ... and 
nlopt::opt::optimize will re-throw an exception. However, the exception that 
is re-thrown by nlopt::opt::optimize will be one of the five exceptions 
above...The reason for this is that C++ has no clean way to save an arbitrary 
exception and rethrow it later...

C++ does provide the bare expression "throw;" which rethrows the currently-
active exception. It may be a better design for nlopt code always to throw one 
of the standard 5 exceptions but I don't think that is required by the 
language. Am I missing something?

Thanks.


_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to