What should he do? He cannot "catch twice" or anything else, and there is no point simply ignoring him. The standard states that if another exception is thrown during stack expansion, then terminate is called.
In the C ++ section, the question is often asked . One βsolutionβ is to wrap your destructor code in a try / catch block and simply not allow exceptions to be thrown.
Another is to create some kind of exception chain configuration scheme. You would do the above, but instead of ignoring the exception, you would add it to the existing exception, and on the catch node handle it as manually.
The best solution, I think, is to try to remove the exclusive code from your destructor.
source share