RE: exception handling on Unix
Posted by
Luigi Ballabio-2 on
URL: http://quantlib.414.s1.nabble.com/Re-exception-handling-on-Unix-tp2571p2576.html
>I'm deeply suspicious of the 'throw()' in the destructor ~Error()
>This will be invoked at the end of the 'catch' block as the (copy
>contructed) exception 'e' is deleted. There is nothing to catch the
>'throw()' and so the program will crash.
No---the throw () after ~Error() is not a statement, it's an exception
specification. It declares that ~Error() throws nothing, i.e., that it does
not throw.
This said, it is certainly possible that something goes wrong. You can try
deleting the destructor and see what happens, to begin with. Or you can try
applying the patch I'm attaching. Let me know if anything works.
Later,
Luigi