Defer: ensure not to throw any exceptions out of a destructor

refs #6989
This commit is contained in:
Alexander A. Klimov 2019-03-01 14:29:35 +01:00
parent e2df11520e
commit a9841a9197

View File

@ -30,7 +30,11 @@ public:
inline inline
~Defer() ~Defer()
{ {
m_Func(); try {
m_Func();
} catch (...) {
// https://stackoverflow.com/questions/130117/throwing-exceptions-out-of-a-destructor
}
} }
private: private: